#include "simint/boys/boys.h"
#include "simint/ostei/gen/ostei_generated.h"
#include "simint/vectorization/vectorization.h"
#include <math.h>
#include <string.h>


int ostei_i_i_k_i(struct simint_multi_shellpair const P,
                  struct simint_multi_shellpair const Q,
                  double screen_tol,
                  double * const restrict work,
                  double * const restrict INT__i_i_k_i)
{

    SIMINT_ASSUME_ALIGN_DBL(work);
    SIMINT_ASSUME_ALIGN_DBL(INT__i_i_k_i);
    int ab, cd, abcd;
    int istart, jstart;
    int iprimcd, nprim_icd, icd;
    const int check_screen = (screen_tol > 0.0);
    int i, j;
    int n;
    int not_screened;
    int real_abcd;
    int iket;
    int ibra;

    // partition workspace
    double * const INT__i_s_k_s = work + (SIMINT_NSHELL_SIMD * 0);
    double * const INT__i_s_l_s = work + (SIMINT_NSHELL_SIMD * 1008);
    double * const INT__i_s_m_s = work + (SIMINT_NSHELL_SIMD * 2268);
    double * const INT__i_s_n_s = work + (SIMINT_NSHELL_SIMD * 3808);
    double * const INT__i_s_o_s = work + (SIMINT_NSHELL_SIMD * 5656);
    double * const INT__i_s_q_s = work + (SIMINT_NSHELL_SIMD * 7840);
    double * const INT__i_s_r_s = work + (SIMINT_NSHELL_SIMD * 10388);
    double * const INT__k_s_k_s = work + (SIMINT_NSHELL_SIMD * 13328);
    double * const INT__k_s_l_s = work + (SIMINT_NSHELL_SIMD * 14624);
    double * const INT__k_s_m_s = work + (SIMINT_NSHELL_SIMD * 16244);
    double * const INT__k_s_n_s = work + (SIMINT_NSHELL_SIMD * 18224);
    double * const INT__k_s_o_s = work + (SIMINT_NSHELL_SIMD * 20600);
    double * const INT__k_s_q_s = work + (SIMINT_NSHELL_SIMD * 23408);
    double * const INT__k_s_r_s = work + (SIMINT_NSHELL_SIMD * 26684);
    double * const INT__l_s_k_s = work + (SIMINT_NSHELL_SIMD * 30464);
    double * const INT__l_s_l_s = work + (SIMINT_NSHELL_SIMD * 32084);
    double * const INT__l_s_m_s = work + (SIMINT_NSHELL_SIMD * 34109);
    double * const INT__l_s_n_s = work + (SIMINT_NSHELL_SIMD * 36584);
    double * const INT__l_s_o_s = work + (SIMINT_NSHELL_SIMD * 39554);
    double * const INT__l_s_q_s = work + (SIMINT_NSHELL_SIMD * 43064);
    double * const INT__l_s_r_s = work + (SIMINT_NSHELL_SIMD * 47159);
    double * const INT__m_s_k_s = work + (SIMINT_NSHELL_SIMD * 51884);
    double * const INT__m_s_l_s = work + (SIMINT_NSHELL_SIMD * 53864);
    double * const INT__m_s_m_s = work + (SIMINT_NSHELL_SIMD * 56339);
    double * const INT__m_s_n_s = work + (SIMINT_NSHELL_SIMD * 59364);
    double * const INT__m_s_o_s = work + (SIMINT_NSHELL_SIMD * 62994);
    double * const INT__m_s_q_s = work + (SIMINT_NSHELL_SIMD * 67284);
    double * const INT__m_s_r_s = work + (SIMINT_NSHELL_SIMD * 72289);
    double * const INT__n_s_k_s = work + (SIMINT_NSHELL_SIMD * 78064);
    double * const INT__n_s_l_s = work + (SIMINT_NSHELL_SIMD * 80440);
    double * const INT__n_s_m_s = work + (SIMINT_NSHELL_SIMD * 83410);
    double * const INT__n_s_n_s = work + (SIMINT_NSHELL_SIMD * 87040);
    double * const INT__n_s_o_s = work + (SIMINT_NSHELL_SIMD * 91396);
    double * const INT__n_s_q_s = work + (SIMINT_NSHELL_SIMD * 96544);
    double * const INT__n_s_r_s = work + (SIMINT_NSHELL_SIMD * 102550);
    double * const INT__o_s_k_s = work + (SIMINT_NSHELL_SIMD * 109480);
    double * const INT__o_s_l_s = work + (SIMINT_NSHELL_SIMD * 112288);
    double * const INT__o_s_m_s = work + (SIMINT_NSHELL_SIMD * 115798);
    double * const INT__o_s_n_s = work + (SIMINT_NSHELL_SIMD * 120088);
    double * const INT__o_s_o_s = work + (SIMINT_NSHELL_SIMD * 125236);
    double * const INT__o_s_q_s = work + (SIMINT_NSHELL_SIMD * 131320);
    double * const INT__o_s_r_s = work + (SIMINT_NSHELL_SIMD * 138418);
    double * const INT__q_s_k_s = work + (SIMINT_NSHELL_SIMD * 146608);
    double * const INT__q_s_l_s = work + (SIMINT_NSHELL_SIMD * 149884);
    double * const INT__q_s_m_s = work + (SIMINT_NSHELL_SIMD * 153979);
    double * const INT__q_s_n_s = work + (SIMINT_NSHELL_SIMD * 158984);
    double * const INT__q_s_o_s = work + (SIMINT_NSHELL_SIMD * 164990);
    double * const INT__q_s_q_s = work + (SIMINT_NSHELL_SIMD * 172088);
    double * const INT__q_s_r_s = work + (SIMINT_NSHELL_SIMD * 180369);
    SIMINT_DBLTYPE * const primwork = (SIMINT_DBLTYPE *)(work + SIMINT_NSHELL_SIMD*189924);
    SIMINT_DBLTYPE * const restrict PRIM_INT__s_s_s_s = primwork + 0;
    SIMINT_DBLTYPE * const restrict PRIM_INT__s_s_p_s = primwork + 26;
    SIMINT_DBLTYPE * const restrict PRIM_INT__s_s_d_s = primwork + 101;
    SIMINT_DBLTYPE * const restrict PRIM_INT__s_s_f_s = primwork + 245;
    SIMINT_DBLTYPE * const restrict PRIM_INT__s_s_g_s = primwork + 475;
    SIMINT_DBLTYPE * const restrict PRIM_INT__s_s_h_s = primwork + 805;
    SIMINT_DBLTYPE * const restrict PRIM_INT__s_s_i_s = primwork + 1246;
    SIMINT_DBLTYPE * const restrict PRIM_INT__s_s_k_s = primwork + 1806;
    SIMINT_DBLTYPE * const restrict PRIM_INT__s_s_l_s = primwork + 2490;
    SIMINT_DBLTYPE * const restrict PRIM_INT__s_s_m_s = primwork + 3300;
    SIMINT_DBLTYPE * const restrict PRIM_INT__s_s_n_s = primwork + 4235;
    SIMINT_DBLTYPE * const restrict PRIM_INT__s_s_o_s = primwork + 5291;
    SIMINT_DBLTYPE * const restrict PRIM_INT__s_s_q_s = primwork + 6461;
    SIMINT_DBLTYPE * const restrict PRIM_INT__s_s_r_s = primwork + 7735;
    SIMINT_DBLTYPE * const restrict PRIM_INT__p_s_s_s = primwork + 9100;
    SIMINT_DBLTYPE * const restrict PRIM_INT__p_s_p_s = primwork + 9136;
    SIMINT_DBLTYPE * const restrict PRIM_INT__p_s_d_s = primwork + 9244;
    SIMINT_DBLTYPE * const restrict PRIM_INT__p_s_f_s = primwork + 9460;
    SIMINT_DBLTYPE * const restrict PRIM_INT__p_s_g_s = primwork + 9820;
    SIMINT_DBLTYPE * const restrict PRIM_INT__p_s_h_s = primwork + 10360;
    SIMINT_DBLTYPE * const restrict PRIM_INT__p_s_i_s = primwork + 11116;
    SIMINT_DBLTYPE * const restrict PRIM_INT__p_s_k_s = primwork + 12124;
    SIMINT_DBLTYPE * const restrict PRIM_INT__p_s_l_s = primwork + 13420;
    SIMINT_DBLTYPE * const restrict PRIM_INT__p_s_m_s = primwork + 15040;
    SIMINT_DBLTYPE * const restrict PRIM_INT__p_s_n_s = primwork + 17020;
    SIMINT_DBLTYPE * const restrict PRIM_INT__p_s_o_s = primwork + 19396;
    SIMINT_DBLTYPE * const restrict PRIM_INT__p_s_q_s = primwork + 22204;
    SIMINT_DBLTYPE * const restrict PRIM_INT__p_s_r_s = primwork + 25480;
    SIMINT_DBLTYPE * const restrict PRIM_INT__d_s_s_s = primwork + 29260;
    SIMINT_DBLTYPE * const restrict PRIM_INT__d_s_p_s = primwork + 29326;
    SIMINT_DBLTYPE * const restrict PRIM_INT__d_s_d_s = primwork + 29524;
    SIMINT_DBLTYPE * const restrict PRIM_INT__d_s_f_s = primwork + 29920;
    SIMINT_DBLTYPE * const restrict PRIM_INT__d_s_g_s = primwork + 30580;
    SIMINT_DBLTYPE * const restrict PRIM_INT__d_s_h_s = primwork + 31570;
    SIMINT_DBLTYPE * const restrict PRIM_INT__d_s_i_s = primwork + 32956;
    SIMINT_DBLTYPE * const restrict PRIM_INT__d_s_k_s = primwork + 34804;
    SIMINT_DBLTYPE * const restrict PRIM_INT__d_s_l_s = primwork + 37180;
    SIMINT_DBLTYPE * const restrict PRIM_INT__d_s_m_s = primwork + 40150;
    SIMINT_DBLTYPE * const restrict PRIM_INT__d_s_n_s = primwork + 43780;
    SIMINT_DBLTYPE * const restrict PRIM_INT__d_s_o_s = primwork + 48136;
    SIMINT_DBLTYPE * const restrict PRIM_INT__d_s_q_s = primwork + 53284;
    SIMINT_DBLTYPE * const restrict PRIM_INT__d_s_r_s = primwork + 59290;
    SIMINT_DBLTYPE * const restrict PRIM_INT__f_s_s_s = primwork + 66220;
    SIMINT_DBLTYPE * const restrict PRIM_INT__f_s_p_s = primwork + 66320;
    SIMINT_DBLTYPE * const restrict PRIM_INT__f_s_d_s = primwork + 66620;
    SIMINT_DBLTYPE * const restrict PRIM_INT__f_s_f_s = primwork + 67220;
    SIMINT_DBLTYPE * const restrict PRIM_INT__f_s_g_s = primwork + 68220;
    SIMINT_DBLTYPE * const restrict PRIM_INT__f_s_h_s = primwork + 69720;
    SIMINT_DBLTYPE * const restrict PRIM_INT__f_s_i_s = primwork + 71820;
    SIMINT_DBLTYPE * const restrict PRIM_INT__f_s_k_s = primwork + 74620;
    SIMINT_DBLTYPE * const restrict PRIM_INT__f_s_l_s = primwork + 78220;
    SIMINT_DBLTYPE * const restrict PRIM_INT__f_s_m_s = primwork + 82720;
    SIMINT_DBLTYPE * const restrict PRIM_INT__f_s_n_s = primwork + 88220;
    SIMINT_DBLTYPE * const restrict PRIM_INT__f_s_o_s = primwork + 94820;
    SIMINT_DBLTYPE * const restrict PRIM_INT__f_s_q_s = primwork + 102620;
    SIMINT_DBLTYPE * const restrict PRIM_INT__f_s_r_s = primwork + 111720;
    SIMINT_DBLTYPE * const restrict PRIM_INT__g_s_s_s = primwork + 122220;
    SIMINT_DBLTYPE * const restrict PRIM_INT__g_s_p_s = primwork + 122355;
    SIMINT_DBLTYPE * const restrict PRIM_INT__g_s_d_s = primwork + 122760;
    SIMINT_DBLTYPE * const restrict PRIM_INT__g_s_f_s = primwork + 123570;
    SIMINT_DBLTYPE * const restrict PRIM_INT__g_s_g_s = primwork + 124920;
    SIMINT_DBLTYPE * const restrict PRIM_INT__g_s_h_s = primwork + 126945;
    SIMINT_DBLTYPE * const restrict PRIM_INT__g_s_i_s = primwork + 129780;
    SIMINT_DBLTYPE * const restrict PRIM_INT__g_s_k_s = primwork + 133560;
    SIMINT_DBLTYPE * const restrict PRIM_INT__g_s_l_s = primwork + 138420;
    SIMINT_DBLTYPE * const restrict PRIM_INT__g_s_m_s = primwork + 144495;
    SIMINT_DBLTYPE * const restrict PRIM_INT__g_s_n_s = primwork + 151920;
    SIMINT_DBLTYPE * const restrict PRIM_INT__g_s_o_s = primwork + 160830;
    SIMINT_DBLTYPE * const restrict PRIM_INT__g_s_q_s = primwork + 171360;
    SIMINT_DBLTYPE * const restrict PRIM_INT__g_s_r_s = primwork + 183645;
    SIMINT_DBLTYPE * const restrict PRIM_INT__h_s_s_s = primwork + 197820;
    SIMINT_DBLTYPE * const restrict PRIM_INT__h_s_p_s = primwork + 197988;
    SIMINT_DBLTYPE * const restrict PRIM_INT__h_s_d_s = primwork + 198492;
    SIMINT_DBLTYPE * const restrict PRIM_INT__h_s_f_s = primwork + 199500;
    SIMINT_DBLTYPE * const restrict PRIM_INT__h_s_g_s = primwork + 201180;
    SIMINT_DBLTYPE * const restrict PRIM_INT__h_s_h_s = primwork + 203700;
    SIMINT_DBLTYPE * const restrict PRIM_INT__h_s_i_s = primwork + 207228;
    SIMINT_DBLTYPE * const restrict PRIM_INT__h_s_k_s = primwork + 211932;
    SIMINT_DBLTYPE * const restrict PRIM_INT__h_s_l_s = primwork + 217980;
    SIMINT_DBLTYPE * const restrict PRIM_INT__h_s_m_s = primwork + 225540;
    SIMINT_DBLTYPE * const restrict PRIM_INT__h_s_n_s = primwork + 234780;
    SIMINT_DBLTYPE * const restrict PRIM_INT__h_s_o_s = primwork + 245868;
    SIMINT_DBLTYPE * const restrict PRIM_INT__h_s_q_s = primwork + 258972;
    SIMINT_DBLTYPE * const restrict PRIM_INT__h_s_r_s = primwork + 274260;
    SIMINT_DBLTYPE * const restrict PRIM_INT__i_s_p_s = primwork + 291900;
    SIMINT_DBLTYPE * const restrict PRIM_INT__i_s_d_s = primwork + 292488;
    SIMINT_DBLTYPE * const restrict PRIM_INT__i_s_f_s = primwork + 293664;
    SIMINT_DBLTYPE * const restrict PRIM_INT__i_s_g_s = primwork + 295624;
    SIMINT_DBLTYPE * const restrict PRIM_INT__i_s_h_s = primwork + 298564;
    SIMINT_DBLTYPE * const restrict PRIM_INT__i_s_i_s = primwork + 302680;
    SIMINT_DBLTYPE * const restrict PRIM_INT__i_s_k_s = primwork + 308168;
    SIMINT_DBLTYPE * const restrict PRIM_INT__i_s_l_s = primwork + 315224;
    SIMINT_DBLTYPE * const restrict PRIM_INT__i_s_m_s = primwork + 324044;
    SIMINT_DBLTYPE * const restrict PRIM_INT__i_s_n_s = primwork + 334824;
    SIMINT_DBLTYPE * const restrict PRIM_INT__i_s_o_s = primwork + 347760;
    SIMINT_DBLTYPE * const restrict PRIM_INT__i_s_q_s = primwork + 363048;
    SIMINT_DBLTYPE * const restrict PRIM_INT__i_s_r_s = primwork + 380884;
    SIMINT_DBLTYPE * const restrict PRIM_INT__k_s_d_s = primwork + 401464;
    SIMINT_DBLTYPE * const restrict PRIM_INT__k_s_f_s = primwork + 402760;
    SIMINT_DBLTYPE * const restrict PRIM_INT__k_s_g_s = primwork + 404920;
    SIMINT_DBLTYPE * const restrict PRIM_INT__k_s_h_s = primwork + 408160;
    SIMINT_DBLTYPE * const restrict PRIM_INT__k_s_i_s = primwork + 412696;
    SIMINT_DBLTYPE * const restrict PRIM_INT__k_s_k_s = primwork + 418744;
    SIMINT_DBLTYPE * const restrict PRIM_INT__k_s_l_s = primwork + 426520;
    SIMINT_DBLTYPE * const restrict PRIM_INT__k_s_m_s = primwork + 436240;
    SIMINT_DBLTYPE * const restrict PRIM_INT__k_s_n_s = primwork + 448120;
    SIMINT_DBLTYPE * const restrict PRIM_INT__k_s_o_s = primwork + 462376;
    SIMINT_DBLTYPE * const restrict PRIM_INT__k_s_q_s = primwork + 479224;
    SIMINT_DBLTYPE * const restrict PRIM_INT__k_s_r_s = primwork + 498880;
    SIMINT_DBLTYPE * const restrict PRIM_INT__l_s_f_s = primwork + 521560;
    SIMINT_DBLTYPE * const restrict PRIM_INT__l_s_g_s = primwork + 523810;
    SIMINT_DBLTYPE * const restrict PRIM_INT__l_s_h_s = primwork + 527185;
    SIMINT_DBLTYPE * const restrict PRIM_INT__l_s_i_s = primwork + 531910;
    SIMINT_DBLTYPE * const restrict PRIM_INT__l_s_k_s = primwork + 538210;
    SIMINT_DBLTYPE * const restrict PRIM_INT__l_s_l_s = primwork + 546310;
    SIMINT_DBLTYPE * const restrict PRIM_INT__l_s_m_s = primwork + 556435;
    SIMINT_DBLTYPE * const restrict PRIM_INT__l_s_n_s = primwork + 568810;
    SIMINT_DBLTYPE * const restrict PRIM_INT__l_s_o_s = primwork + 583660;
    SIMINT_DBLTYPE * const restrict PRIM_INT__l_s_q_s = primwork + 601210;
    SIMINT_DBLTYPE * const restrict PRIM_INT__l_s_r_s = primwork + 621685;
    SIMINT_DBLTYPE * const restrict PRIM_INT__m_s_g_s = primwork + 645310;
    SIMINT_DBLTYPE * const restrict PRIM_INT__m_s_h_s = primwork + 648610;
    SIMINT_DBLTYPE * const restrict PRIM_INT__m_s_i_s = primwork + 653230;
    SIMINT_DBLTYPE * const restrict PRIM_INT__m_s_k_s = primwork + 659390;
    SIMINT_DBLTYPE * const restrict PRIM_INT__m_s_l_s = primwork + 667310;
    SIMINT_DBLTYPE * const restrict PRIM_INT__m_s_m_s = primwork + 677210;
    SIMINT_DBLTYPE * const restrict PRIM_INT__m_s_n_s = primwork + 689310;
    SIMINT_DBLTYPE * const restrict PRIM_INT__m_s_o_s = primwork + 703830;
    SIMINT_DBLTYPE * const restrict PRIM_INT__m_s_q_s = primwork + 720990;
    SIMINT_DBLTYPE * const restrict PRIM_INT__m_s_r_s = primwork + 741010;
    SIMINT_DBLTYPE * const restrict PRIM_INT__n_s_h_s = primwork + 764110;
    SIMINT_DBLTYPE * const restrict PRIM_INT__n_s_i_s = primwork + 768268;
    SIMINT_DBLTYPE * const restrict PRIM_INT__n_s_k_s = primwork + 773812;
    SIMINT_DBLTYPE * const restrict PRIM_INT__n_s_l_s = primwork + 780940;
    SIMINT_DBLTYPE * const restrict PRIM_INT__n_s_m_s = primwork + 789850;
    SIMINT_DBLTYPE * const restrict PRIM_INT__n_s_n_s = primwork + 800740;
    SIMINT_DBLTYPE * const restrict PRIM_INT__n_s_o_s = primwork + 813808;
    SIMINT_DBLTYPE * const restrict PRIM_INT__n_s_q_s = primwork + 829252;
    SIMINT_DBLTYPE * const restrict PRIM_INT__n_s_r_s = primwork + 847270;
    SIMINT_DBLTYPE * const restrict PRIM_INT__o_s_i_s = primwork + 868060;
    SIMINT_DBLTYPE * const restrict PRIM_INT__o_s_k_s = primwork + 872428;
    SIMINT_DBLTYPE * const restrict PRIM_INT__o_s_l_s = primwork + 878044;
    SIMINT_DBLTYPE * const restrict PRIM_INT__o_s_m_s = primwork + 885064;
    SIMINT_DBLTYPE * const restrict PRIM_INT__o_s_n_s = primwork + 893644;
    SIMINT_DBLTYPE * const restrict PRIM_INT__o_s_o_s = primwork + 903940;
    SIMINT_DBLTYPE * const restrict PRIM_INT__o_s_q_s = primwork + 916108;
    SIMINT_DBLTYPE * const restrict PRIM_INT__o_s_r_s = primwork + 930304;
    SIMINT_DBLTYPE * const restrict PRIM_INT__q_s_k_s = primwork + 946684;
    SIMINT_DBLTYPE * const restrict PRIM_INT__q_s_l_s = primwork + 949960;
    SIMINT_DBLTYPE * const restrict PRIM_INT__q_s_m_s = primwork + 954055;
    SIMINT_DBLTYPE * const restrict PRIM_INT__q_s_n_s = primwork + 959060;
    SIMINT_DBLTYPE * const restrict PRIM_INT__q_s_o_s = primwork + 965066;
    SIMINT_DBLTYPE * const restrict PRIM_INT__q_s_q_s = primwork + 972164;
    SIMINT_DBLTYPE * const restrict PRIM_INT__q_s_r_s = primwork + 980445;
    double * const hrrwork = (double *)(primwork + 990000);
    double * const HRR_INT__i_p_k_s = hrrwork + 0;
    double * const HRR_INT__i_p_l_s = hrrwork + 3024;
    double * const HRR_INT__i_p_m_s = hrrwork + 6804;
    double * const HRR_INT__i_p_n_s = hrrwork + 11424;
    double * const HRR_INT__i_p_o_s = hrrwork + 16968;
    double * const HRR_INT__i_p_q_s = hrrwork + 23520;
    double * const HRR_INT__i_p_r_s = hrrwork + 31164;
    double * const HRR_INT__i_d_k_s = hrrwork + 39984;
    double * const HRR_INT__i_d_l_s = hrrwork + 46032;
    double * const HRR_INT__i_d_m_s = hrrwork + 53592;
    double * const HRR_INT__i_d_n_s = hrrwork + 62832;
    double * const HRR_INT__i_d_o_s = hrrwork + 73920;
    double * const HRR_INT__i_d_q_s = hrrwork + 87024;
    double * const HRR_INT__i_d_r_s = hrrwork + 102312;
    double * const HRR_INT__i_f_k_s = hrrwork + 119952;
    double * const HRR_INT__i_f_l_s = hrrwork + 130032;
    double * const HRR_INT__i_f_m_s = hrrwork + 142632;
    double * const HRR_INT__i_f_n_s = hrrwork + 158032;
    double * const HRR_INT__i_f_o_s = hrrwork + 176512;
    double * const HRR_INT__i_f_q_s = hrrwork + 198352;
    double * const HRR_INT__i_f_r_s = hrrwork + 223832;
    double * const HRR_INT__i_g_k_s = hrrwork + 253232;
    double * const HRR_INT__i_g_l_s = hrrwork + 268352;
    double * const HRR_INT__i_g_m_s = hrrwork + 287252;
    double * const HRR_INT__i_g_n_s = hrrwork + 310352;
    double * const HRR_INT__i_g_o_s = hrrwork + 338072;
    double * const HRR_INT__i_g_q_s = hrrwork + 370832;
    double * const HRR_INT__i_g_r_s = hrrwork + 409052;
    double * const HRR_INT__i_h_k_s = hrrwork + 453152;
    double * const HRR_INT__i_h_l_s = hrrwork + 474320;
    double * const HRR_INT__i_h_m_s = hrrwork + 500780;
    double * const HRR_INT__i_h_n_s = hrrwork + 533120;
    double * const HRR_INT__i_h_o_s = hrrwork + 571928;
    double * const HRR_INT__i_h_q_s = hrrwork + 617792;
    double * const HRR_INT__i_h_r_s = hrrwork + 671300;
    double * const HRR_INT__i_i_k_s = hrrwork + 733040;
    double * const HRR_INT__i_i_k_p = hrrwork + 761264;
    double * const HRR_INT__i_i_k_d = hrrwork + 845936;
    double * const HRR_INT__i_i_k_f = hrrwork + 1015280;
    double * const HRR_INT__i_i_k_g = hrrwork + 1297520;
    double * const HRR_INT__i_i_k_h = hrrwork + 1720880;
    double * const HRR_INT__i_i_l_s = hrrwork + 2313584;
    double * const HRR_INT__i_i_l_p = hrrwork + 2348864;
    double * const HRR_INT__i_i_l_d = hrrwork + 2454704;
    double * const HRR_INT__i_i_l_f = hrrwork + 2666384;
    double * const HRR_INT__i_i_l_g = hrrwork + 3019184;
    double * const HRR_INT__i_i_l_h = hrrwork + 3548384;
    double * const HRR_INT__i_i_m_s = hrrwork + 4289264;
    double * const HRR_INT__i_i_m_p = hrrwork + 4332384;
    double * const HRR_INT__i_i_m_d = hrrwork + 4461744;
    double * const HRR_INT__i_i_m_f = hrrwork + 4720464;
    double * const HRR_INT__i_i_m_g = hrrwork + 5151664;
    double * const HRR_INT__i_i_n_s = hrrwork + 5798464;
    double * const HRR_INT__i_i_n_p = hrrwork + 5850208;
    double * const HRR_INT__i_i_n_d = hrrwork + 6005440;
    double * const HRR_INT__i_i_n_f = hrrwork + 6315904;
    double * const HRR_INT__i_i_o_s = hrrwork + 6833344;
    double * const HRR_INT__i_i_o_p = hrrwork + 6894496;
    double * const HRR_INT__i_i_o_d = hrrwork + 7077952;
    double * const HRR_INT__i_i_q_s = hrrwork + 7444864;
    double * const HRR_INT__i_i_q_p = hrrwork + 7516208;
    double * const HRR_INT__i_i_r_s = hrrwork + 7730240;
    double * const HRR_INT__k_p_k_s = hrrwork + 7812560;
    double * const HRR_INT__k_p_l_s = hrrwork + 7816448;
    double * const HRR_INT__k_p_m_s = hrrwork + 7821308;
    double * const HRR_INT__k_p_n_s = hrrwork + 7827248;
    double * const HRR_INT__k_p_o_s = hrrwork + 7834376;
    double * const HRR_INT__k_p_q_s = hrrwork + 7842800;
    double * const HRR_INT__k_p_r_s = hrrwork + 7852628;
    double * const HRR_INT__k_d_k_s = hrrwork + 7863968;
    double * const HRR_INT__k_d_l_s = hrrwork + 7871744;
    double * const HRR_INT__k_d_m_s = hrrwork + 7881464;
    double * const HRR_INT__k_d_n_s = hrrwork + 7893344;
    double * const HRR_INT__k_d_o_s = hrrwork + 7907600;
    double * const HRR_INT__k_d_q_s = hrrwork + 7924448;
    double * const HRR_INT__k_d_r_s = hrrwork + 7944104;
    double * const HRR_INT__k_f_k_s = hrrwork + 7966784;
    double * const HRR_INT__k_f_l_s = hrrwork + 7979744;
    double * const HRR_INT__k_f_m_s = hrrwork + 7995944;
    double * const HRR_INT__k_f_n_s = hrrwork + 8015744;
    double * const HRR_INT__k_f_o_s = hrrwork + 8039504;
    double * const HRR_INT__k_f_q_s = hrrwork + 8067584;
    double * const HRR_INT__k_f_r_s = hrrwork + 8100344;
    double * const HRR_INT__k_g_k_s = hrrwork + 8138144;
    double * const HRR_INT__k_g_l_s = hrrwork + 8157584;
    double * const HRR_INT__k_g_m_s = hrrwork + 8181884;
    double * const HRR_INT__k_g_n_s = hrrwork + 8211584;
    double * const HRR_INT__k_g_o_s = hrrwork + 8247224;
    double * const HRR_INT__k_g_q_s = hrrwork + 8289344;
    double * const HRR_INT__k_g_r_s = hrrwork + 8338484;
    double * const HRR_INT__k_h_k_s = hrrwork + 8395184;
    double * const HRR_INT__k_h_l_s = hrrwork + 8422400;
    double * const HRR_INT__k_h_m_s = hrrwork + 8456420;
    double * const HRR_INT__k_h_n_s = hrrwork + 8498000;
    double * const HRR_INT__k_h_o_s = hrrwork + 8547896;
    double * const HRR_INT__k_h_q_s = hrrwork + 8606864;
    double * const HRR_INT__k_h_r_s = hrrwork + 8675660;
    double * const HRR_INT__l_p_k_s = hrrwork + 8755040;
    double * const HRR_INT__l_p_l_s = hrrwork + 8759900;
    double * const HRR_INT__l_p_m_s = hrrwork + 8765975;
    double * const HRR_INT__l_p_n_s = hrrwork + 8773400;
    double * const HRR_INT__l_p_o_s = hrrwork + 8782310;
    double * const HRR_INT__l_p_q_s = hrrwork + 8792840;
    double * const HRR_INT__l_p_r_s = hrrwork + 8805125;
    double * const HRR_INT__l_d_k_s = hrrwork + 8819300;
    double * const HRR_INT__l_d_l_s = hrrwork + 8829020;
    double * const HRR_INT__l_d_m_s = hrrwork + 8841170;
    double * const HRR_INT__l_d_n_s = hrrwork + 8856020;
    double * const HRR_INT__l_d_o_s = hrrwork + 8873840;
    double * const HRR_INT__l_d_q_s = hrrwork + 8894900;
    double * const HRR_INT__l_d_r_s = hrrwork + 8919470;
    double * const HRR_INT__l_f_k_s = hrrwork + 8947820;
    double * const HRR_INT__l_f_l_s = hrrwork + 8964020;
    double * const HRR_INT__l_f_m_s = hrrwork + 8984270;
    double * const HRR_INT__l_f_n_s = hrrwork + 9009020;
    double * const HRR_INT__l_f_o_s = hrrwork + 9038720;
    double * const HRR_INT__l_f_q_s = hrrwork + 9073820;
    double * const HRR_INT__l_f_r_s = hrrwork + 9114770;
    double * const HRR_INT__l_g_k_s = hrrwork + 9162020;
    double * const HRR_INT__l_g_l_s = hrrwork + 9186320;
    double * const HRR_INT__l_g_m_s = hrrwork + 9216695;
    double * const HRR_INT__l_g_n_s = hrrwork + 9253820;
    double * const HRR_INT__l_g_o_s = hrrwork + 9298370;
    double * const HRR_INT__l_g_q_s = hrrwork + 9351020;
    double * const HRR_INT__l_g_r_s = hrrwork + 9412445;
    double * const HRR_INT__m_p_k_s = hrrwork + 9483320;
    double * const HRR_INT__m_p_l_s = hrrwork + 9489260;
    double * const HRR_INT__m_p_m_s = hrrwork + 9496685;
    double * const HRR_INT__m_p_n_s = hrrwork + 9505760;
    double * const HRR_INT__m_p_o_s = hrrwork + 9516650;
    double * const HRR_INT__m_p_q_s = hrrwork + 9529520;
    double * const HRR_INT__m_p_r_s = hrrwork + 9544535;
    double * const HRR_INT__m_d_k_s = hrrwork + 9561860;
    double * const HRR_INT__m_d_l_s = hrrwork + 9573740;
    double * const HRR_INT__m_d_m_s = hrrwork + 9588590;
    double * const HRR_INT__m_d_n_s = hrrwork + 9606740;
    double * const HRR_INT__m_d_o_s = hrrwork + 9628520;
    double * const HRR_INT__m_d_q_s = hrrwork + 9654260;
    double * const HRR_INT__m_d_r_s = hrrwork + 9684290;
    double * const HRR_INT__m_f_k_s = hrrwork + 9718940;
    double * const HRR_INT__m_f_l_s = hrrwork + 9738740;
    double * const HRR_INT__m_f_m_s = hrrwork + 9763490;
    double * const HRR_INT__m_f_n_s = hrrwork + 9793740;
    double * const HRR_INT__m_f_o_s = hrrwork + 9830040;
    double * const HRR_INT__m_f_q_s = hrrwork + 9872940;
    double * const HRR_INT__m_f_r_s = hrrwork + 9922990;
    double * const HRR_INT__n_p_k_s = hrrwork + 9980740;
    double * const HRR_INT__n_p_l_s = hrrwork + 9987868;
    double * const HRR_INT__n_p_m_s = hrrwork + 9996778;
    double * const HRR_INT__n_p_n_s = hrrwork + 10007668;
    double * const HRR_INT__n_p_o_s = hrrwork + 10020736;
    double * const HRR_INT__n_p_q_s = hrrwork + 10036180;
    double * const HRR_INT__n_p_r_s = hrrwork + 10054198;
    double * const HRR_INT__n_d_k_s = hrrwork + 10074988;
    double * const HRR_INT__n_d_l_s = hrrwork + 10089244;
    double * const HRR_INT__n_d_m_s = hrrwork + 10107064;
    double * const HRR_INT__n_d_n_s = hrrwork + 10128844;
    double * const HRR_INT__n_d_o_s = hrrwork + 10154980;
    double * const HRR_INT__n_d_q_s = hrrwork + 10185868;
    double * const HRR_INT__n_d_r_s = hrrwork + 10221904;
    double * const HRR_INT__o_p_k_s = hrrwork + 10263484;
    double * const HRR_INT__o_p_l_s = hrrwork + 10271908;
    double * const HRR_INT__o_p_m_s = hrrwork + 10282438;
    double * const HRR_INT__o_p_n_s = hrrwork + 10295308;
    double * const HRR_INT__o_p_o_s = hrrwork + 10310752;
    double * const HRR_INT__o_p_q_s = hrrwork + 10329004;
    double * const HRR_INT__o_p_r_s = hrrwork + 10350298;


    // Create constants
    const SIMINT_DBLTYPE const_1 = SIMINT_DBLSET1(1);
    const SIMINT_DBLTYPE const_10 = SIMINT_DBLSET1(10);
    const SIMINT_DBLTYPE const_11 = SIMINT_DBLSET1(11);
    const SIMINT_DBLTYPE const_12 = SIMINT_DBLSET1(12);
    const SIMINT_DBLTYPE const_13 = SIMINT_DBLSET1(13);
    const SIMINT_DBLTYPE const_2 = SIMINT_DBLSET1(2);
    const SIMINT_DBLTYPE const_3 = SIMINT_DBLSET1(3);
    const SIMINT_DBLTYPE const_4 = SIMINT_DBLSET1(4);
    const SIMINT_DBLTYPE const_5 = SIMINT_DBLSET1(5);
    const SIMINT_DBLTYPE const_6 = SIMINT_DBLSET1(6);
    const SIMINT_DBLTYPE const_7 = SIMINT_DBLSET1(7);
    const SIMINT_DBLTYPE const_8 = SIMINT_DBLSET1(8);
    const SIMINT_DBLTYPE const_9 = SIMINT_DBLSET1(9);
    const SIMINT_DBLTYPE one_half = SIMINT_DBLSET1(0.5);


    ////////////////////////////////////////
    // Loop over shells and primitives
    ////////////////////////////////////////

    real_abcd = 0;
    istart = 0;
    for(ab = 0; ab < P.nshell12_clip; ++ab)
    {
        const int iend = istart + P.nprim12[ab];

        cd = 0;
        jstart = 0;

        for(cd = 0; cd < Q.nshell12_clip; cd += SIMINT_NSHELL_SIMD)
        {
            const int nshellbatch = ((cd + SIMINT_NSHELL_SIMD) > Q.nshell12_clip) ? Q.nshell12_clip - cd : SIMINT_NSHELL_SIMD;
            int jend = jstart;
            for(i = 0; i < nshellbatch; i++)
                jend += Q.nprim12[cd+i];

            // Clear the beginning of the workspace (where we are accumulating integrals)
            memset(work, 0, SIMINT_NSHELL_SIMD * 189924 * sizeof(double));
            abcd = 0;


            for(i = istart; i < iend; ++i)
            {
                SIMINT_DBLTYPE bra_screen_max;  // only used if check_screen

                if(check_screen)
                {
                    // Skip this whole thing if always insignificant
                    if((P.screen[i] * Q.screen_max) < screen_tol)
                        continue;
                    bra_screen_max = SIMINT_DBLSET1(P.screen[i]);
                }

                icd = 0;
                iprimcd = 0;
                nprim_icd = Q.nprim12[cd];
                double * restrict PRIM_PTR_INT__i_s_k_s = INT__i_s_k_s + abcd * 1008;
                double * restrict PRIM_PTR_INT__i_s_l_s = INT__i_s_l_s + abcd * 1260;
                double * restrict PRIM_PTR_INT__i_s_m_s = INT__i_s_m_s + abcd * 1540;
                double * restrict PRIM_PTR_INT__i_s_n_s = INT__i_s_n_s + abcd * 1848;
                double * restrict PRIM_PTR_INT__i_s_o_s = INT__i_s_o_s + abcd * 2184;
                double * restrict PRIM_PTR_INT__i_s_q_s = INT__i_s_q_s + abcd * 2548;
                double * restrict PRIM_PTR_INT__i_s_r_s = INT__i_s_r_s + abcd * 2940;
                double * restrict PRIM_PTR_INT__k_s_k_s = INT__k_s_k_s + abcd * 1296;
                double * restrict PRIM_PTR_INT__k_s_l_s = INT__k_s_l_s + abcd * 1620;
                double * restrict PRIM_PTR_INT__k_s_m_s = INT__k_s_m_s + abcd * 1980;
                double * restrict PRIM_PTR_INT__k_s_n_s = INT__k_s_n_s + abcd * 2376;
                double * restrict PRIM_PTR_INT__k_s_o_s = INT__k_s_o_s + abcd * 2808;
                double * restrict PRIM_PTR_INT__k_s_q_s = INT__k_s_q_s + abcd * 3276;
                double * restrict PRIM_PTR_INT__k_s_r_s = INT__k_s_r_s + abcd * 3780;
                double * restrict PRIM_PTR_INT__l_s_k_s = INT__l_s_k_s + abcd * 1620;
                double * restrict PRIM_PTR_INT__l_s_l_s = INT__l_s_l_s + abcd * 2025;
                double * restrict PRIM_PTR_INT__l_s_m_s = INT__l_s_m_s + abcd * 2475;
                double * restrict PRIM_PTR_INT__l_s_n_s = INT__l_s_n_s + abcd * 2970;
                double * restrict PRIM_PTR_INT__l_s_o_s = INT__l_s_o_s + abcd * 3510;
                double * restrict PRIM_PTR_INT__l_s_q_s = INT__l_s_q_s + abcd * 4095;
                double * restrict PRIM_PTR_INT__l_s_r_s = INT__l_s_r_s + abcd * 4725;
                double * restrict PRIM_PTR_INT__m_s_k_s = INT__m_s_k_s + abcd * 1980;
                double * restrict PRIM_PTR_INT__m_s_l_s = INT__m_s_l_s + abcd * 2475;
                double * restrict PRIM_PTR_INT__m_s_m_s = INT__m_s_m_s + abcd * 3025;
                double * restrict PRIM_PTR_INT__m_s_n_s = INT__m_s_n_s + abcd * 3630;
                double * restrict PRIM_PTR_INT__m_s_o_s = INT__m_s_o_s + abcd * 4290;
                double * restrict PRIM_PTR_INT__m_s_q_s = INT__m_s_q_s + abcd * 5005;
                double * restrict PRIM_PTR_INT__m_s_r_s = INT__m_s_r_s + abcd * 5775;
                double * restrict PRIM_PTR_INT__n_s_k_s = INT__n_s_k_s + abcd * 2376;
                double * restrict PRIM_PTR_INT__n_s_l_s = INT__n_s_l_s + abcd * 2970;
                double * restrict PRIM_PTR_INT__n_s_m_s = INT__n_s_m_s + abcd * 3630;
                double * restrict PRIM_PTR_INT__n_s_n_s = INT__n_s_n_s + abcd * 4356;
                double * restrict PRIM_PTR_INT__n_s_o_s = INT__n_s_o_s + abcd * 5148;
                double * restrict PRIM_PTR_INT__n_s_q_s = INT__n_s_q_s + abcd * 6006;
                double * restrict PRIM_PTR_INT__n_s_r_s = INT__n_s_r_s + abcd * 6930;
                double * restrict PRIM_PTR_INT__o_s_k_s = INT__o_s_k_s + abcd * 2808;
                double * restrict PRIM_PTR_INT__o_s_l_s = INT__o_s_l_s + abcd * 3510;
                double * restrict PRIM_PTR_INT__o_s_m_s = INT__o_s_m_s + abcd * 4290;
                double * restrict PRIM_PTR_INT__o_s_n_s = INT__o_s_n_s + abcd * 5148;
                double * restrict PRIM_PTR_INT__o_s_o_s = INT__o_s_o_s + abcd * 6084;
                double * restrict PRIM_PTR_INT__o_s_q_s = INT__o_s_q_s + abcd * 7098;
                double * restrict PRIM_PTR_INT__o_s_r_s = INT__o_s_r_s + abcd * 8190;
                double * restrict PRIM_PTR_INT__q_s_k_s = INT__q_s_k_s + abcd * 3276;
                double * restrict PRIM_PTR_INT__q_s_l_s = INT__q_s_l_s + abcd * 4095;
                double * restrict PRIM_PTR_INT__q_s_m_s = INT__q_s_m_s + abcd * 5005;
                double * restrict PRIM_PTR_INT__q_s_n_s = INT__q_s_n_s + abcd * 6006;
                double * restrict PRIM_PTR_INT__q_s_o_s = INT__q_s_o_s + abcd * 7098;
                double * restrict PRIM_PTR_INT__q_s_q_s = INT__q_s_q_s + abcd * 8281;
                double * restrict PRIM_PTR_INT__q_s_r_s = INT__q_s_r_s + abcd * 9555;



                // Load these one per loop over i
                const SIMINT_DBLTYPE P_alpha = SIMINT_DBLSET1(P.alpha[i]);
                const SIMINT_DBLTYPE P_prefac = SIMINT_DBLSET1(P.prefac[i]);
                const SIMINT_DBLTYPE Pxyz[3] = { SIMINT_DBLSET1(P.x[i]), SIMINT_DBLSET1(P.y[i]), SIMINT_DBLSET1(P.z[i]) };

                const SIMINT_DBLTYPE P_PA[3] = { SIMINT_DBLSET1(P.PA_x[i]), SIMINT_DBLSET1(P.PA_y[i]), SIMINT_DBLSET1(P.PA_z[i]) };

                for(j = jstart; j < jend; j += SIMINT_SIMD_LEN)
                {
                    // calculate the shell offsets
                    // these are the offset from the shell pointed to by cd
                    // for each element
                    int shelloffsets[SIMINT_SIMD_LEN] = {0};
                    int lastoffset = 0;
                    const int nlane = ( ((j + SIMINT_SIMD_LEN) < jend) ? SIMINT_SIMD_LEN : (jend - j));

                    if((iprimcd + SIMINT_SIMD_LEN) >= nprim_icd)
                    {
                        // Handle if the first element of the vector is a new shell
                        if(iprimcd >= nprim_icd && ((icd+1) < nshellbatch))
                        {
                            nprim_icd += Q.nprim12[cd + (++icd)];
                            PRIM_PTR_INT__i_s_k_s += 1008;
                            PRIM_PTR_INT__i_s_l_s += 1260;
                            PRIM_PTR_INT__i_s_m_s += 1540;
                            PRIM_PTR_INT__i_s_n_s += 1848;
                            PRIM_PTR_INT__i_s_o_s += 2184;
                            PRIM_PTR_INT__i_s_q_s += 2548;
                            PRIM_PTR_INT__i_s_r_s += 2940;
                            PRIM_PTR_INT__k_s_k_s += 1296;
                            PRIM_PTR_INT__k_s_l_s += 1620;
                            PRIM_PTR_INT__k_s_m_s += 1980;
                            PRIM_PTR_INT__k_s_n_s += 2376;
                            PRIM_PTR_INT__k_s_o_s += 2808;
                            PRIM_PTR_INT__k_s_q_s += 3276;
                            PRIM_PTR_INT__k_s_r_s += 3780;
                            PRIM_PTR_INT__l_s_k_s += 1620;
                            PRIM_PTR_INT__l_s_l_s += 2025;
                            PRIM_PTR_INT__l_s_m_s += 2475;
                            PRIM_PTR_INT__l_s_n_s += 2970;
                            PRIM_PTR_INT__l_s_o_s += 3510;
                            PRIM_PTR_INT__l_s_q_s += 4095;
                            PRIM_PTR_INT__l_s_r_s += 4725;
                            PRIM_PTR_INT__m_s_k_s += 1980;
                            PRIM_PTR_INT__m_s_l_s += 2475;
                            PRIM_PTR_INT__m_s_m_s += 3025;
                            PRIM_PTR_INT__m_s_n_s += 3630;
                            PRIM_PTR_INT__m_s_o_s += 4290;
                            PRIM_PTR_INT__m_s_q_s += 5005;
                            PRIM_PTR_INT__m_s_r_s += 5775;
                            PRIM_PTR_INT__n_s_k_s += 2376;
                            PRIM_PTR_INT__n_s_l_s += 2970;
                            PRIM_PTR_INT__n_s_m_s += 3630;
                            PRIM_PTR_INT__n_s_n_s += 4356;
                            PRIM_PTR_INT__n_s_o_s += 5148;
                            PRIM_PTR_INT__n_s_q_s += 6006;
                            PRIM_PTR_INT__n_s_r_s += 6930;
                            PRIM_PTR_INT__o_s_k_s += 2808;
                            PRIM_PTR_INT__o_s_l_s += 3510;
                            PRIM_PTR_INT__o_s_m_s += 4290;
                            PRIM_PTR_INT__o_s_n_s += 5148;
                            PRIM_PTR_INT__o_s_o_s += 6084;
                            PRIM_PTR_INT__o_s_q_s += 7098;
                            PRIM_PTR_INT__o_s_r_s += 8190;
                            PRIM_PTR_INT__q_s_k_s += 3276;
                            PRIM_PTR_INT__q_s_l_s += 4095;
                            PRIM_PTR_INT__q_s_m_s += 5005;
                            PRIM_PTR_INT__q_s_n_s += 6006;
                            PRIM_PTR_INT__q_s_o_s += 7098;
                            PRIM_PTR_INT__q_s_q_s += 8281;
                            PRIM_PTR_INT__q_s_r_s += 9555;
                        }
                        iprimcd++;
                        for(n = 1; n < SIMINT_SIMD_LEN; ++n)
                        {
                            if(iprimcd >= nprim_icd && ((icd+1) < nshellbatch))
                            {
                                shelloffsets[n] = shelloffsets[n-1] + 1;
                                lastoffset++;
                                nprim_icd += Q.nprim12[cd + (++icd)];
                            }
                            else
                                shelloffsets[n] = shelloffsets[n-1];
                            iprimcd++;
                        }
                    }
                    else
                        iprimcd += SIMINT_SIMD_LEN;

                    // Do we have to compute this vector (or has it been screened out)?
                    // (not_screened != 0 means we have to do this vector)
                    if(check_screen)
                    {
                        const double vmax = vector_max(SIMINT_MUL(bra_screen_max, SIMINT_DBLLOAD(Q.screen, j)));
                        if(vmax < screen_tol)
                        {
                            PRIM_PTR_INT__i_s_k_s += lastoffset*1008;
                            PRIM_PTR_INT__i_s_l_s += lastoffset*1260;
                            PRIM_PTR_INT__i_s_m_s += lastoffset*1540;
                            PRIM_PTR_INT__i_s_n_s += lastoffset*1848;
                            PRIM_PTR_INT__i_s_o_s += lastoffset*2184;
                            PRIM_PTR_INT__i_s_q_s += lastoffset*2548;
                            PRIM_PTR_INT__i_s_r_s += lastoffset*2940;
                            PRIM_PTR_INT__k_s_k_s += lastoffset*1296;
                            PRIM_PTR_INT__k_s_l_s += lastoffset*1620;
                            PRIM_PTR_INT__k_s_m_s += lastoffset*1980;
                            PRIM_PTR_INT__k_s_n_s += lastoffset*2376;
                            PRIM_PTR_INT__k_s_o_s += lastoffset*2808;
                            PRIM_PTR_INT__k_s_q_s += lastoffset*3276;
                            PRIM_PTR_INT__k_s_r_s += lastoffset*3780;
                            PRIM_PTR_INT__l_s_k_s += lastoffset*1620;
                            PRIM_PTR_INT__l_s_l_s += lastoffset*2025;
                            PRIM_PTR_INT__l_s_m_s += lastoffset*2475;
                            PRIM_PTR_INT__l_s_n_s += lastoffset*2970;
                            PRIM_PTR_INT__l_s_o_s += lastoffset*3510;
                            PRIM_PTR_INT__l_s_q_s += lastoffset*4095;
                            PRIM_PTR_INT__l_s_r_s += lastoffset*4725;
                            PRIM_PTR_INT__m_s_k_s += lastoffset*1980;
                            PRIM_PTR_INT__m_s_l_s += lastoffset*2475;
                            PRIM_PTR_INT__m_s_m_s += lastoffset*3025;
                            PRIM_PTR_INT__m_s_n_s += lastoffset*3630;
                            PRIM_PTR_INT__m_s_o_s += lastoffset*4290;
                            PRIM_PTR_INT__m_s_q_s += lastoffset*5005;
                            PRIM_PTR_INT__m_s_r_s += lastoffset*5775;
                            PRIM_PTR_INT__n_s_k_s += lastoffset*2376;
                            PRIM_PTR_INT__n_s_l_s += lastoffset*2970;
                            PRIM_PTR_INT__n_s_m_s += lastoffset*3630;
                            PRIM_PTR_INT__n_s_n_s += lastoffset*4356;
                            PRIM_PTR_INT__n_s_o_s += lastoffset*5148;
                            PRIM_PTR_INT__n_s_q_s += lastoffset*6006;
                            PRIM_PTR_INT__n_s_r_s += lastoffset*6930;
                            PRIM_PTR_INT__o_s_k_s += lastoffset*2808;
                            PRIM_PTR_INT__o_s_l_s += lastoffset*3510;
                            PRIM_PTR_INT__o_s_m_s += lastoffset*4290;
                            PRIM_PTR_INT__o_s_n_s += lastoffset*5148;
                            PRIM_PTR_INT__o_s_o_s += lastoffset*6084;
                            PRIM_PTR_INT__o_s_q_s += lastoffset*7098;
                            PRIM_PTR_INT__o_s_r_s += lastoffset*8190;
                            PRIM_PTR_INT__q_s_k_s += lastoffset*3276;
                            PRIM_PTR_INT__q_s_l_s += lastoffset*4095;
                            PRIM_PTR_INT__q_s_m_s += lastoffset*5005;
                            PRIM_PTR_INT__q_s_n_s += lastoffset*6006;
                            PRIM_PTR_INT__q_s_o_s += lastoffset*7098;
                            PRIM_PTR_INT__q_s_q_s += lastoffset*8281;
                            PRIM_PTR_INT__q_s_r_s += lastoffset*9555;
                            continue;
                        }
                    }

                    const SIMINT_DBLTYPE Q_alpha = SIMINT_DBLLOAD(Q.alpha, j);
                    const SIMINT_DBLTYPE PQalpha_mul = SIMINT_MUL(P_alpha, Q_alpha);
                    const SIMINT_DBLTYPE PQalpha_sum = SIMINT_ADD(P_alpha, Q_alpha);
                    const SIMINT_DBLTYPE one_over_PQalpha_sum = SIMINT_DIV(const_1, PQalpha_sum);


                    /* construct R2 = (Px - Qx)**2 + (Py - Qy)**2 + (Pz -Qz)**2 */
                    SIMINT_DBLTYPE PQ[3];
                    PQ[0] = SIMINT_SUB(Pxyz[0], SIMINT_DBLLOAD(Q.x, j));
                    PQ[1] = SIMINT_SUB(Pxyz[1], SIMINT_DBLLOAD(Q.y, j));
                    PQ[2] = SIMINT_SUB(Pxyz[2], SIMINT_DBLLOAD(Q.z, j));
                    SIMINT_DBLTYPE R2 = SIMINT_MUL(PQ[0], PQ[0]);
                    R2 = SIMINT_FMADD(PQ[1], PQ[1], R2);
                    R2 = SIMINT_FMADD(PQ[2], PQ[2], R2);

                    const SIMINT_DBLTYPE alpha = SIMINT_MUL(PQalpha_mul, one_over_PQalpha_sum); // alpha from MEST
                    const SIMINT_DBLTYPE one_over_p = SIMINT_DIV(const_1, P_alpha);
                    const SIMINT_DBLTYPE one_over_q = SIMINT_DIV(const_1, Q_alpha);
                    const SIMINT_DBLTYPE one_over_2p = SIMINT_MUL(one_half, one_over_p);
                    const SIMINT_DBLTYPE one_over_2q = SIMINT_MUL(one_half, one_over_q);
                    const SIMINT_DBLTYPE one_over_2pq = SIMINT_MUL(one_half, one_over_PQalpha_sum);
                    const SIMINT_DBLTYPE Q_PA[3] = { SIMINT_DBLLOAD(Q.PA_x, j), SIMINT_DBLLOAD(Q.PA_y, j), SIMINT_DBLLOAD(Q.PA_z, j) };

                    // NOTE: Minus sign!
                    const SIMINT_DBLTYPE a_over_p = SIMINT_MUL(SIMINT_NEG(alpha), one_over_p);
                    SIMINT_DBLTYPE aop_PQ[3];
                    aop_PQ[0] = SIMINT_MUL(a_over_p, PQ[0]);
                    aop_PQ[1] = SIMINT_MUL(a_over_p, PQ[1]);
                    aop_PQ[2] = SIMINT_MUL(a_over_p, PQ[2]);

                    SIMINT_DBLTYPE a_over_q = SIMINT_MUL(alpha, one_over_q);
                    SIMINT_DBLTYPE aoq_PQ[3];
                    aoq_PQ[0] = SIMINT_MUL(a_over_q, PQ[0]);
                    aoq_PQ[1] = SIMINT_MUL(a_over_q, PQ[1]);
                    aoq_PQ[2] = SIMINT_MUL(a_over_q, PQ[2]);
                    // Put a minus sign here so we don't have to in RR routines
                    a_over_q = SIMINT_NEG(a_over_q);


                    //////////////////////////////////////////////
                    // Fjt function section
                    // Maximum v value: 25
                    //////////////////////////////////////////////
                    // The parameter to the Fjt function
                    const SIMINT_DBLTYPE F_x = SIMINT_MUL(R2, alpha);


                    const SIMINT_DBLTYPE Q_prefac = mask_load(nlane, Q.prefac + j);


                    boys_F_split(PRIM_INT__s_s_s_s, F_x, 25);
                    SIMINT_DBLTYPE prefac = SIMINT_SQRT(one_over_PQalpha_sum);
                    prefac = SIMINT_MUL(SIMINT_MUL(P_prefac, Q_prefac), prefac);
                    for(n = 0; n <= 25; n++)
                        PRIM_INT__s_s_s_s[n] = SIMINT_MUL(PRIM_INT__s_s_s_s[n], prefac);

                    //////////////////////////////////////////////
                    // Primitive integrals: Vertical recurrance
                    //////////////////////////////////////////////

                    const SIMINT_DBLTYPE vrr_const_1_over_2p = one_over_2p;
                    const SIMINT_DBLTYPE vrr_const_2_over_2p = SIMINT_MUL(const_2, one_over_2p);
                    const SIMINT_DBLTYPE vrr_const_3_over_2p = SIMINT_MUL(const_3, one_over_2p);
                    const SIMINT_DBLTYPE vrr_const_4_over_2p = SIMINT_MUL(const_4, one_over_2p);
                    const SIMINT_DBLTYPE vrr_const_5_over_2p = SIMINT_MUL(const_5, one_over_2p);
                    const SIMINT_DBLTYPE vrr_const_6_over_2p = SIMINT_MUL(const_6, one_over_2p);
                    const SIMINT_DBLTYPE vrr_const_7_over_2p = SIMINT_MUL(const_7, one_over_2p);
                    const SIMINT_DBLTYPE vrr_const_8_over_2p = SIMINT_MUL(const_8, one_over_2p);
                    const SIMINT_DBLTYPE vrr_const_9_over_2p = SIMINT_MUL(const_9, one_over_2p);
                    const SIMINT_DBLTYPE vrr_const_10_over_2p = SIMINT_MUL(const_10, one_over_2p);
                    const SIMINT_DBLTYPE vrr_const_11_over_2p = SIMINT_MUL(const_11, one_over_2p);
                    const SIMINT_DBLTYPE vrr_const_1_over_2q = one_over_2q;
                    const SIMINT_DBLTYPE vrr_const_2_over_2q = SIMINT_MUL(const_2, one_over_2q);
                    const SIMINT_DBLTYPE vrr_const_3_over_2q = SIMINT_MUL(const_3, one_over_2q);
                    const SIMINT_DBLTYPE vrr_const_4_over_2q = SIMINT_MUL(const_4, one_over_2q);
                    const SIMINT_DBLTYPE vrr_const_5_over_2q = SIMINT_MUL(const_5, one_over_2q);
                    const SIMINT_DBLTYPE vrr_const_6_over_2q = SIMINT_MUL(const_6, one_over_2q);
                    const SIMINT_DBLTYPE vrr_const_7_over_2q = SIMINT_MUL(const_7, one_over_2q);
                    const SIMINT_DBLTYPE vrr_const_8_over_2q = SIMINT_MUL(const_8, one_over_2q);
                    const SIMINT_DBLTYPE vrr_const_9_over_2q = SIMINT_MUL(const_9, one_over_2q);
                    const SIMINT_DBLTYPE vrr_const_10_over_2q = SIMINT_MUL(const_10, one_over_2q);
                    const SIMINT_DBLTYPE vrr_const_11_over_2q = SIMINT_MUL(const_11, one_over_2q);
                    const SIMINT_DBLTYPE vrr_const_12_over_2q = SIMINT_MUL(const_12, one_over_2q);
                    const SIMINT_DBLTYPE vrr_const_1_over_2pq = one_over_2pq;
                    const SIMINT_DBLTYPE vrr_const_2_over_2pq = SIMINT_MUL(const_2, one_over_2pq);
                    const SIMINT_DBLTYPE vrr_const_3_over_2pq = SIMINT_MUL(const_3, one_over_2pq);
                    const SIMINT_DBLTYPE vrr_const_4_over_2pq = SIMINT_MUL(const_4, one_over_2pq);
                    const SIMINT_DBLTYPE vrr_const_5_over_2pq = SIMINT_MUL(const_5, one_over_2pq);
                    const SIMINT_DBLTYPE vrr_const_6_over_2pq = SIMINT_MUL(const_6, one_over_2pq);
                    const SIMINT_DBLTYPE vrr_const_7_over_2pq = SIMINT_MUL(const_7, one_over_2pq);
                    const SIMINT_DBLTYPE vrr_const_8_over_2pq = SIMINT_MUL(const_8, one_over_2pq);
                    const SIMINT_DBLTYPE vrr_const_9_over_2pq = SIMINT_MUL(const_9, one_over_2pq);
                    const SIMINT_DBLTYPE vrr_const_10_over_2pq = SIMINT_MUL(const_10, one_over_2pq);
                    const SIMINT_DBLTYPE vrr_const_11_over_2pq = SIMINT_MUL(const_11, one_over_2pq);
                    const SIMINT_DBLTYPE vrr_const_12_over_2pq = SIMINT_MUL(const_12, one_over_2pq);
                    const SIMINT_DBLTYPE vrr_const_13_over_2pq = SIMINT_MUL(const_13, one_over_2pq);



                    // Forming PRIM_INT__s_s_p_s[25 * 3];
                    for(n = 0; n < 25; ++n)  // loop over orders of auxiliary function
                    {

                        PRIM_INT__s_s_p_s[n * 3 + 0] = SIMINT_MUL(Q_PA[0], PRIM_INT__s_s_s_s[n * 1 + 0]);
                        PRIM_INT__s_s_p_s[n * 3 + 0] = SIMINT_FMADD( aoq_PQ[0], PRIM_INT__s_s_s_s[(n+1) * 1 + 0], PRIM_INT__s_s_p_s[n * 3 + 0]);

                        PRIM_INT__s_s_p_s[n * 3 + 1] = SIMINT_MUL(Q_PA[1], PRIM_INT__s_s_s_s[n * 1 + 0]);
                        PRIM_INT__s_s_p_s[n * 3 + 1] = SIMINT_FMADD( aoq_PQ[1], PRIM_INT__s_s_s_s[(n+1) * 1 + 0], PRIM_INT__s_s_p_s[n * 3 + 1]);

                        PRIM_INT__s_s_p_s[n * 3 + 2] = SIMINT_MUL(Q_PA[2], PRIM_INT__s_s_s_s[n * 1 + 0]);
                        PRIM_INT__s_s_p_s[n * 3 + 2] = SIMINT_FMADD( aoq_PQ[2], PRIM_INT__s_s_s_s[(n+1) * 1 + 0], PRIM_INT__s_s_p_s[n * 3 + 2]);

                    }



                    // Forming PRIM_INT__s_s_d_s[24 * 6];
                    for(n = 0; n < 24; ++n)  // loop over orders of auxiliary function
                    {

                        PRIM_INT__s_s_d_s[n * 6 + 0] = SIMINT_MUL(Q_PA[0], PRIM_INT__s_s_p_s[n * 3 + 0]);
                        PRIM_INT__s_s_d_s[n * 6 + 0] = SIMINT_FMADD( aoq_PQ[0], PRIM_INT__s_s_p_s[(n+1) * 3 + 0], PRIM_INT__s_s_d_s[n * 6 + 0]);
                        PRIM_INT__s_s_d_s[n * 6 + 0] = SIMINT_FMADD( vrr_const_1_over_2q, SIMINT_FMADD(a_over_q, PRIM_INT__s_s_s_s[(n+1) * 1 + 0], PRIM_INT__s_s_s_s[n * 1 + 0]), PRIM_INT__s_s_d_s[n * 6 + 0]);

                        PRIM_INT__s_s_d_s[n * 6 + 1] = SIMINT_MUL(Q_PA[1], PRIM_INT__s_s_p_s[n * 3 + 0]);
                        PRIM_INT__s_s_d_s[n * 6 + 1] = SIMINT_FMADD( aoq_PQ[1], PRIM_INT__s_s_p_s[(n+1) * 3 + 0], PRIM_INT__s_s_d_s[n * 6 + 1]);

                        PRIM_INT__s_s_d_s[n * 6 + 2] = SIMINT_MUL(Q_PA[2], PRIM_INT__s_s_p_s[n * 3 + 0]);
                        PRIM_INT__s_s_d_s[n * 6 + 2] = SIMINT_FMADD( aoq_PQ[2], PRIM_INT__s_s_p_s[(n+1) * 3 + 0], PRIM_INT__s_s_d_s[n * 6 + 2]);

                        PRIM_INT__s_s_d_s[n * 6 + 3] = SIMINT_MUL(Q_PA[1], PRIM_INT__s_s_p_s[n * 3 + 1]);
                        PRIM_INT__s_s_d_s[n * 6 + 3] = SIMINT_FMADD( aoq_PQ[1], PRIM_INT__s_s_p_s[(n+1) * 3 + 1], PRIM_INT__s_s_d_s[n * 6 + 3]);
                        PRIM_INT__s_s_d_s[n * 6 + 3] = SIMINT_FMADD( vrr_const_1_over_2q, SIMINT_FMADD(a_over_q, PRIM_INT__s_s_s_s[(n+1) * 1 + 0], PRIM_INT__s_s_s_s[n * 1 + 0]), PRIM_INT__s_s_d_s[n * 6 + 3]);

                        PRIM_INT__s_s_d_s[n * 6 + 4] = SIMINT_MUL(Q_PA[2], PRIM_INT__s_s_p_s[n * 3 + 1]);
                        PRIM_INT__s_s_d_s[n * 6 + 4] = SIMINT_FMADD( aoq_PQ[2], PRIM_INT__s_s_p_s[(n+1) * 3 + 1], PRIM_INT__s_s_d_s[n * 6 + 4]);

                        PRIM_INT__s_s_d_s[n * 6 + 5] = SIMINT_MUL(Q_PA[2], PRIM_INT__s_s_p_s[n * 3 + 2]);
                        PRIM_INT__s_s_d_s[n * 6 + 5] = SIMINT_FMADD( aoq_PQ[2], PRIM_INT__s_s_p_s[(n+1) * 3 + 2], PRIM_INT__s_s_d_s[n * 6 + 5]);
                        PRIM_INT__s_s_d_s[n * 6 + 5] = SIMINT_FMADD( vrr_const_1_over_2q, SIMINT_FMADD(a_over_q, PRIM_INT__s_s_s_s[(n+1) * 1 + 0], PRIM_INT__s_s_s_s[n * 1 + 0]), PRIM_INT__s_s_d_s[n * 6 + 5]);

                    }



                    // Forming PRIM_INT__s_s_f_s[23 * 10];
                    for(n = 0; n < 23; ++n)  // loop over orders of auxiliary function
                    {

                        PRIM_INT__s_s_f_s[n * 10 + 0] = SIMINT_MUL(Q_PA[0], PRIM_INT__s_s_d_s[n * 6 + 0]);
                        PRIM_INT__s_s_f_s[n * 10 + 0] = SIMINT_FMADD( aoq_PQ[0], PRIM_INT__s_s_d_s[(n+1) * 6 + 0], PRIM_INT__s_s_f_s[n * 10 + 0]);
                        PRIM_INT__s_s_f_s[n * 10 + 0] = SIMINT_FMADD( vrr_const_2_over_2q, SIMINT_FMADD(a_over_q, PRIM_INT__s_s_p_s[(n+1) * 3 + 0], PRIM_INT__s_s_p_s[n * 3 + 0]), PRIM_INT__s_s_f_s[n * 10 + 0]);

                        PRIM_INT__s_s_f_s[n * 10 + 1] = SIMINT_MUL(Q_PA[1], PRIM_INT__s_s_d_s[n * 6 + 0]);
                        PRIM_INT__s_s_f_s[n * 10 + 1] = SIMINT_FMADD( aoq_PQ[1], PRIM_INT__s_s_d_s[(n+1) * 6 + 0], PRIM_INT__s_s_f_s[n * 10 + 1]);

                        PRIM_INT__s_s_f_s[n * 10 + 2] = SIMINT_MUL(Q_PA[2], PRIM_INT__s_s_d_s[n * 6 + 0]);
                        PRIM_INT__s_s_f_s[n * 10 + 2] = SIMINT_FMADD( aoq_PQ[2], PRIM_INT__s_s_d_s[(n+1) * 6 + 0], PRIM_INT__s_s_f_s[n * 10 + 2]);

                        PRIM_INT__s_s_f_s[n * 10 + 3] = SIMINT_MUL(Q_PA[0], PRIM_INT__s_s_d_s[n * 6 + 3]);
                        PRIM_INT__s_s_f_s[n * 10 + 3] = SIMINT_FMADD( aoq_PQ[0], PRIM_INT__s_s_d_s[(n+1) * 6 + 3], PRIM_INT__s_s_f_s[n * 10 + 3]);

                        PRIM_INT__s_s_f_s[n * 10 + 4] = SIMINT_MUL(Q_PA[2], PRIM_INT__s_s_d_s[n * 6 + 1]);
                        PRIM_INT__s_s_f_s[n * 10 + 4] = SIMINT_FMADD( aoq_PQ[2], PRIM_INT__s_s_d_s[(n+1) * 6 + 1], PRIM_INT__s_s_f_s[n * 10 + 4]);

                        PRIM_INT__s_s_f_s[n * 10 + 5] = SIMINT_MUL(Q_PA[0], PRIM_INT__s_s_d_s[n * 6 + 5]);
                        PRIM_INT__s_s_f_s[n * 10 + 5] = SIMINT_FMADD( aoq_PQ[0], PRIM_INT__s_s_d_s[(n+1) * 6 + 5], PRIM_INT__s_s_f_s[n * 10 + 5]);

                        PRIM_INT__s_s_f_s[n * 10 + 6] = SIMINT_MUL(Q_PA[1], PRIM_INT__s_s_d_s[n * 6 + 3]);
                        PRIM_INT__s_s_f_s[n * 10 + 6] = SIMINT_FMADD( aoq_PQ[1], PRIM_INT__s_s_d_s[(n+1) * 6 + 3], PRIM_INT__s_s_f_s[n * 10 + 6]);
                        PRIM_INT__s_s_f_s[n * 10 + 6] = SIMINT_FMADD( vrr_const_2_over_2q, SIMINT_FMADD(a_over_q, PRIM_INT__s_s_p_s[(n+1) * 3 + 1], PRIM_INT__s_s_p_s[n * 3 + 1]), PRIM_INT__s_s_f_s[n * 10 + 6]);

                        PRIM_INT__s_s_f_s[n * 10 + 7] = SIMINT_MUL(Q_PA[2], PRIM_INT__s_s_d_s[n * 6 + 3]);
                        PRIM_INT__s_s_f_s[n * 10 + 7] = SIMINT_FMADD( aoq_PQ[2], PRIM_INT__s_s_d_s[(n+1) * 6 + 3], PRIM_INT__s_s_f_s[n * 10 + 7]);

                        PRIM_INT__s_s_f_s[n * 10 + 8] = SIMINT_MUL(Q_PA[1], PRIM_INT__s_s_d_s[n * 6 + 5]);
                        PRIM_INT__s_s_f_s[n * 10 + 8] = SIMINT_FMADD( aoq_PQ[1], PRIM_INT__s_s_d_s[(n+1) * 6 + 5], PRIM_INT__s_s_f_s[n * 10 + 8]);

                        PRIM_INT__s_s_f_s[n * 10 + 9] = SIMINT_MUL(Q_PA[2], PRIM_INT__s_s_d_s[n * 6 + 5]);
                        PRIM_INT__s_s_f_s[n * 10 + 9] = SIMINT_FMADD( aoq_PQ[2], PRIM_INT__s_s_d_s[(n+1) * 6 + 5], PRIM_INT__s_s_f_s[n * 10 + 9]);
                        PRIM_INT__s_s_f_s[n * 10 + 9] = SIMINT_FMADD( vrr_const_2_over_2q, SIMINT_FMADD(a_over_q, PRIM_INT__s_s_p_s[(n+1) * 3 + 2], PRIM_INT__s_s_p_s[n * 3 + 2]), PRIM_INT__s_s_f_s[n * 10 + 9]);

                    }


                    VRR_K_s_s_g_s(
                            PRIM_INT__s_s_g_s,
                            PRIM_INT__s_s_f_s,
                            PRIM_INT__s_s_d_s,
                            Q_PA,
                            a_over_q,
                            aoq_PQ,
                            one_over_2q,
                            22);


                    VRR_K_s_s_h_s(
                            PRIM_INT__s_s_h_s,
                            PRIM_INT__s_s_g_s,
                            PRIM_INT__s_s_f_s,
                            Q_PA,
                            a_over_q,
                            aoq_PQ,
                            one_over_2q,
                            21);


                    ostei_general_vrr1_K(6, 20,
                            one_over_2q, a_over_q, aoq_PQ, Q_PA,
                            PRIM_INT__s_s_h_s, PRIM_INT__s_s_g_s, PRIM_INT__s_s_i_s);


                    ostei_general_vrr1_K(7, 19,
                            one_over_2q, a_over_q, aoq_PQ, Q_PA,
                            PRIM_INT__s_s_i_s, PRIM_INT__s_s_h_s, PRIM_INT__s_s_k_s);


                    ostei_general_vrr_I(1, 0, 7, 0, 12,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__s_s_k_s, NULL, NULL, PRIM_INT__s_s_i_s, NULL, PRIM_INT__p_s_k_s);


                    ostei_general_vrr_I(1, 0, 6, 0, 12,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__s_s_i_s, NULL, NULL, PRIM_INT__s_s_h_s, NULL, PRIM_INT__p_s_i_s);


                    ostei_general_vrr_I(2, 0, 7, 0, 11,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__p_s_k_s, PRIM_INT__s_s_k_s, NULL, PRIM_INT__p_s_i_s, NULL, PRIM_INT__d_s_k_s);


                    ostei_general_vrr_I(1, 0, 5, 0, 12,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__s_s_h_s, NULL, NULL, PRIM_INT__s_s_g_s, NULL, PRIM_INT__p_s_h_s);


                    ostei_general_vrr_I(2, 0, 6, 0, 11,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__p_s_i_s, PRIM_INT__s_s_i_s, NULL, PRIM_INT__p_s_h_s, NULL, PRIM_INT__d_s_i_s);


                    ostei_general_vrr_I(3, 0, 7, 0, 10,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__d_s_k_s, PRIM_INT__p_s_k_s, NULL, PRIM_INT__d_s_i_s, NULL, PRIM_INT__f_s_k_s);


                    VRR_I_p_s_g_s(
                            PRIM_INT__p_s_g_s,
                            PRIM_INT__s_s_g_s,
                            PRIM_INT__s_s_f_s,
                            P_PA,
                            aop_PQ,
                            one_over_2pq,
                            12);


                    ostei_general_vrr_I(2, 0, 5, 0, 11,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__p_s_h_s, PRIM_INT__s_s_h_s, NULL, PRIM_INT__p_s_g_s, NULL, PRIM_INT__d_s_h_s);


                    ostei_general_vrr_I(3, 0, 6, 0, 10,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__d_s_i_s, PRIM_INT__p_s_i_s, NULL, PRIM_INT__d_s_h_s, NULL, PRIM_INT__f_s_i_s);


                    ostei_general_vrr_I(4, 0, 7, 0, 9,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__f_s_k_s, PRIM_INT__d_s_k_s, NULL, PRIM_INT__f_s_i_s, NULL, PRIM_INT__g_s_k_s);


                    VRR_I_p_s_f_s(
                            PRIM_INT__p_s_f_s,
                            PRIM_INT__s_s_f_s,
                            PRIM_INT__s_s_d_s,
                            P_PA,
                            aop_PQ,
                            one_over_2pq,
                            12);


                    ostei_general_vrr_I(2, 0, 4, 0, 11,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__p_s_g_s, PRIM_INT__s_s_g_s, NULL, PRIM_INT__p_s_f_s, NULL, PRIM_INT__d_s_g_s);


                    ostei_general_vrr_I(3, 0, 5, 0, 10,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__d_s_h_s, PRIM_INT__p_s_h_s, NULL, PRIM_INT__d_s_g_s, NULL, PRIM_INT__f_s_h_s);


                    ostei_general_vrr_I(4, 0, 6, 0, 9,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__f_s_i_s, PRIM_INT__d_s_i_s, NULL, PRIM_INT__f_s_h_s, NULL, PRIM_INT__g_s_i_s);


                    ostei_general_vrr_I(5, 0, 7, 0, 8,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__g_s_k_s, PRIM_INT__f_s_k_s, NULL, PRIM_INT__g_s_i_s, NULL, PRIM_INT__h_s_k_s);



                    // Forming PRIM_INT__p_s_d_s[12 * 18];
                    for(n = 0; n < 12; ++n)  // loop over orders of auxiliary function
                    {

                        PRIM_INT__p_s_d_s[n * 18 + 0] = SIMINT_MUL(P_PA[0], PRIM_INT__s_s_d_s[n * 6 + 0]);
                        PRIM_INT__p_s_d_s[n * 18 + 0] = SIMINT_FMADD( aop_PQ[0], PRIM_INT__s_s_d_s[(n+1) * 6 + 0], PRIM_INT__p_s_d_s[n * 18 + 0]);
                        PRIM_INT__p_s_d_s[n * 18 + 0] = SIMINT_FMADD( vrr_const_2_over_2pq, PRIM_INT__s_s_p_s[(n+1) * 3 + 0], PRIM_INT__p_s_d_s[n * 18 + 0]);

                        PRIM_INT__p_s_d_s[n * 18 + 1] = SIMINT_MUL(P_PA[0], PRIM_INT__s_s_d_s[n * 6 + 1]);
                        PRIM_INT__p_s_d_s[n * 18 + 1] = SIMINT_FMADD( aop_PQ[0], PRIM_INT__s_s_d_s[(n+1) * 6 + 1], PRIM_INT__p_s_d_s[n * 18 + 1]);
                        PRIM_INT__p_s_d_s[n * 18 + 1] = SIMINT_FMADD( vrr_const_1_over_2pq, PRIM_INT__s_s_p_s[(n+1) * 3 + 1], PRIM_INT__p_s_d_s[n * 18 + 1]);

                        PRIM_INT__p_s_d_s[n * 18 + 2] = SIMINT_MUL(P_PA[0], PRIM_INT__s_s_d_s[n * 6 + 2]);
                        PRIM_INT__p_s_d_s[n * 18 + 2] = SIMINT_FMADD( aop_PQ[0], PRIM_INT__s_s_d_s[(n+1) * 6 + 2], PRIM_INT__p_s_d_s[n * 18 + 2]);
                        PRIM_INT__p_s_d_s[n * 18 + 2] = SIMINT_FMADD( vrr_const_1_over_2pq, PRIM_INT__s_s_p_s[(n+1) * 3 + 2], PRIM_INT__p_s_d_s[n * 18 + 2]);

                        PRIM_INT__p_s_d_s[n * 18 + 3] = SIMINT_MUL(P_PA[0], PRIM_INT__s_s_d_s[n * 6 + 3]);
                        PRIM_INT__p_s_d_s[n * 18 + 3] = SIMINT_FMADD( aop_PQ[0], PRIM_INT__s_s_d_s[(n+1) * 6 + 3], PRIM_INT__p_s_d_s[n * 18 + 3]);

                        PRIM_INT__p_s_d_s[n * 18 + 4] = SIMINT_MUL(P_PA[0], PRIM_INT__s_s_d_s[n * 6 + 4]);
                        PRIM_INT__p_s_d_s[n * 18 + 4] = SIMINT_FMADD( aop_PQ[0], PRIM_INT__s_s_d_s[(n+1) * 6 + 4], PRIM_INT__p_s_d_s[n * 18 + 4]);

                        PRIM_INT__p_s_d_s[n * 18 + 5] = SIMINT_MUL(P_PA[0], PRIM_INT__s_s_d_s[n * 6 + 5]);
                        PRIM_INT__p_s_d_s[n * 18 + 5] = SIMINT_FMADD( aop_PQ[0], PRIM_INT__s_s_d_s[(n+1) * 6 + 5], PRIM_INT__p_s_d_s[n * 18 + 5]);

                        PRIM_INT__p_s_d_s[n * 18 + 6] = SIMINT_MUL(P_PA[1], PRIM_INT__s_s_d_s[n * 6 + 0]);
                        PRIM_INT__p_s_d_s[n * 18 + 6] = SIMINT_FMADD( aop_PQ[1], PRIM_INT__s_s_d_s[(n+1) * 6 + 0], PRIM_INT__p_s_d_s[n * 18 + 6]);

                        PRIM_INT__p_s_d_s[n * 18 + 7] = SIMINT_MUL(P_PA[1], PRIM_INT__s_s_d_s[n * 6 + 1]);
                        PRIM_INT__p_s_d_s[n * 18 + 7] = SIMINT_FMADD( aop_PQ[1], PRIM_INT__s_s_d_s[(n+1) * 6 + 1], PRIM_INT__p_s_d_s[n * 18 + 7]);
                        PRIM_INT__p_s_d_s[n * 18 + 7] = SIMINT_FMADD( vrr_const_1_over_2pq, PRIM_INT__s_s_p_s[(n+1) * 3 + 0], PRIM_INT__p_s_d_s[n * 18 + 7]);

                        PRIM_INT__p_s_d_s[n * 18 + 8] = SIMINT_MUL(P_PA[1], PRIM_INT__s_s_d_s[n * 6 + 2]);
                        PRIM_INT__p_s_d_s[n * 18 + 8] = SIMINT_FMADD( aop_PQ[1], PRIM_INT__s_s_d_s[(n+1) * 6 + 2], PRIM_INT__p_s_d_s[n * 18 + 8]);

                        PRIM_INT__p_s_d_s[n * 18 + 9] = SIMINT_MUL(P_PA[1], PRIM_INT__s_s_d_s[n * 6 + 3]);
                        PRIM_INT__p_s_d_s[n * 18 + 9] = SIMINT_FMADD( aop_PQ[1], PRIM_INT__s_s_d_s[(n+1) * 6 + 3], PRIM_INT__p_s_d_s[n * 18 + 9]);
                        PRIM_INT__p_s_d_s[n * 18 + 9] = SIMINT_FMADD( vrr_const_2_over_2pq, PRIM_INT__s_s_p_s[(n+1) * 3 + 1], PRIM_INT__p_s_d_s[n * 18 + 9]);

                        PRIM_INT__p_s_d_s[n * 18 + 10] = SIMINT_MUL(P_PA[1], PRIM_INT__s_s_d_s[n * 6 + 4]);
                        PRIM_INT__p_s_d_s[n * 18 + 10] = SIMINT_FMADD( aop_PQ[1], PRIM_INT__s_s_d_s[(n+1) * 6 + 4], PRIM_INT__p_s_d_s[n * 18 + 10]);
                        PRIM_INT__p_s_d_s[n * 18 + 10] = SIMINT_FMADD( vrr_const_1_over_2pq, PRIM_INT__s_s_p_s[(n+1) * 3 + 2], PRIM_INT__p_s_d_s[n * 18 + 10]);

                        PRIM_INT__p_s_d_s[n * 18 + 11] = SIMINT_MUL(P_PA[1], PRIM_INT__s_s_d_s[n * 6 + 5]);
                        PRIM_INT__p_s_d_s[n * 18 + 11] = SIMINT_FMADD( aop_PQ[1], PRIM_INT__s_s_d_s[(n+1) * 6 + 5], PRIM_INT__p_s_d_s[n * 18 + 11]);

                        PRIM_INT__p_s_d_s[n * 18 + 12] = SIMINT_MUL(P_PA[2], PRIM_INT__s_s_d_s[n * 6 + 0]);
                        PRIM_INT__p_s_d_s[n * 18 + 12] = SIMINT_FMADD( aop_PQ[2], PRIM_INT__s_s_d_s[(n+1) * 6 + 0], PRIM_INT__p_s_d_s[n * 18 + 12]);

                        PRIM_INT__p_s_d_s[n * 18 + 13] = SIMINT_MUL(P_PA[2], PRIM_INT__s_s_d_s[n * 6 + 1]);
                        PRIM_INT__p_s_d_s[n * 18 + 13] = SIMINT_FMADD( aop_PQ[2], PRIM_INT__s_s_d_s[(n+1) * 6 + 1], PRIM_INT__p_s_d_s[n * 18 + 13]);

                        PRIM_INT__p_s_d_s[n * 18 + 14] = SIMINT_MUL(P_PA[2], PRIM_INT__s_s_d_s[n * 6 + 2]);
                        PRIM_INT__p_s_d_s[n * 18 + 14] = SIMINT_FMADD( aop_PQ[2], PRIM_INT__s_s_d_s[(n+1) * 6 + 2], PRIM_INT__p_s_d_s[n * 18 + 14]);
                        PRIM_INT__p_s_d_s[n * 18 + 14] = SIMINT_FMADD( vrr_const_1_over_2pq, PRIM_INT__s_s_p_s[(n+1) * 3 + 0], PRIM_INT__p_s_d_s[n * 18 + 14]);

                        PRIM_INT__p_s_d_s[n * 18 + 15] = SIMINT_MUL(P_PA[2], PRIM_INT__s_s_d_s[n * 6 + 3]);
                        PRIM_INT__p_s_d_s[n * 18 + 15] = SIMINT_FMADD( aop_PQ[2], PRIM_INT__s_s_d_s[(n+1) * 6 + 3], PRIM_INT__p_s_d_s[n * 18 + 15]);

                        PRIM_INT__p_s_d_s[n * 18 + 16] = SIMINT_MUL(P_PA[2], PRIM_INT__s_s_d_s[n * 6 + 4]);
                        PRIM_INT__p_s_d_s[n * 18 + 16] = SIMINT_FMADD( aop_PQ[2], PRIM_INT__s_s_d_s[(n+1) * 6 + 4], PRIM_INT__p_s_d_s[n * 18 + 16]);
                        PRIM_INT__p_s_d_s[n * 18 + 16] = SIMINT_FMADD( vrr_const_1_over_2pq, PRIM_INT__s_s_p_s[(n+1) * 3 + 1], PRIM_INT__p_s_d_s[n * 18 + 16]);

                        PRIM_INT__p_s_d_s[n * 18 + 17] = SIMINT_MUL(P_PA[2], PRIM_INT__s_s_d_s[n * 6 + 5]);
                        PRIM_INT__p_s_d_s[n * 18 + 17] = SIMINT_FMADD( aop_PQ[2], PRIM_INT__s_s_d_s[(n+1) * 6 + 5], PRIM_INT__p_s_d_s[n * 18 + 17]);
                        PRIM_INT__p_s_d_s[n * 18 + 17] = SIMINT_FMADD( vrr_const_2_over_2pq, PRIM_INT__s_s_p_s[(n+1) * 3 + 2], PRIM_INT__p_s_d_s[n * 18 + 17]);

                    }


                    VRR_I_d_s_f_s(
                            PRIM_INT__d_s_f_s,
                            PRIM_INT__p_s_f_s,
                            PRIM_INT__s_s_f_s,
                            PRIM_INT__p_s_d_s,
                            P_PA,
                            a_over_p,
                            aop_PQ,
                            one_over_2p,
                            one_over_2pq,
                            11);


                    ostei_general_vrr_I(3, 0, 4, 0, 10,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__d_s_g_s, PRIM_INT__p_s_g_s, NULL, PRIM_INT__d_s_f_s, NULL, PRIM_INT__f_s_g_s);


                    ostei_general_vrr_I(4, 0, 5, 0, 9,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__f_s_h_s, PRIM_INT__d_s_h_s, NULL, PRIM_INT__f_s_g_s, NULL, PRIM_INT__g_s_h_s);


                    ostei_general_vrr_I(5, 0, 6, 0, 8,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__g_s_i_s, PRIM_INT__f_s_i_s, NULL, PRIM_INT__g_s_h_s, NULL, PRIM_INT__h_s_i_s);


                    ostei_general_vrr_I(6, 0, 7, 0, 7,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__h_s_k_s, PRIM_INT__g_s_k_s, NULL, PRIM_INT__h_s_i_s, NULL, PRIM_INT__i_s_k_s);


                    ostei_general_vrr1_K(8, 18,
                            one_over_2q, a_over_q, aoq_PQ, Q_PA,
                            PRIM_INT__s_s_k_s, PRIM_INT__s_s_i_s, PRIM_INT__s_s_l_s);


                    ostei_general_vrr_I(1, 0, 8, 0, 12,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__s_s_l_s, NULL, NULL, PRIM_INT__s_s_k_s, NULL, PRIM_INT__p_s_l_s);


                    ostei_general_vrr_I(2, 0, 8, 0, 11,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__p_s_l_s, PRIM_INT__s_s_l_s, NULL, PRIM_INT__p_s_k_s, NULL, PRIM_INT__d_s_l_s);


                    ostei_general_vrr_I(3, 0, 8, 0, 10,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__d_s_l_s, PRIM_INT__p_s_l_s, NULL, PRIM_INT__d_s_k_s, NULL, PRIM_INT__f_s_l_s);


                    ostei_general_vrr_I(4, 0, 8, 0, 9,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__f_s_l_s, PRIM_INT__d_s_l_s, NULL, PRIM_INT__f_s_k_s, NULL, PRIM_INT__g_s_l_s);


                    ostei_general_vrr_I(5, 0, 8, 0, 8,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__g_s_l_s, PRIM_INT__f_s_l_s, NULL, PRIM_INT__g_s_k_s, NULL, PRIM_INT__h_s_l_s);


                    ostei_general_vrr_I(6, 0, 8, 0, 7,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__h_s_l_s, PRIM_INT__g_s_l_s, NULL, PRIM_INT__h_s_k_s, NULL, PRIM_INT__i_s_l_s);



                    // Forming PRIM_INT__p_s_p_s[12 * 9];
                    for(n = 0; n < 12; ++n)  // loop over orders of auxiliary function
                    {

                        PRIM_INT__p_s_p_s[n * 9 + 0] = SIMINT_MUL(P_PA[0], PRIM_INT__s_s_p_s[n * 3 + 0]);
                        PRIM_INT__p_s_p_s[n * 9 + 0] = SIMINT_FMADD( aop_PQ[0], PRIM_INT__s_s_p_s[(n+1) * 3 + 0], PRIM_INT__p_s_p_s[n * 9 + 0]);
                        PRIM_INT__p_s_p_s[n * 9 + 0] = SIMINT_FMADD( vrr_const_1_over_2pq, PRIM_INT__s_s_s_s[(n+1) * 1 + 0], PRIM_INT__p_s_p_s[n * 9 + 0]);

                        PRIM_INT__p_s_p_s[n * 9 + 1] = SIMINT_MUL(P_PA[0], PRIM_INT__s_s_p_s[n * 3 + 1]);
                        PRIM_INT__p_s_p_s[n * 9 + 1] = SIMINT_FMADD( aop_PQ[0], PRIM_INT__s_s_p_s[(n+1) * 3 + 1], PRIM_INT__p_s_p_s[n * 9 + 1]);

                        PRIM_INT__p_s_p_s[n * 9 + 2] = SIMINT_MUL(P_PA[0], PRIM_INT__s_s_p_s[n * 3 + 2]);
                        PRIM_INT__p_s_p_s[n * 9 + 2] = SIMINT_FMADD( aop_PQ[0], PRIM_INT__s_s_p_s[(n+1) * 3 + 2], PRIM_INT__p_s_p_s[n * 9 + 2]);

                        PRIM_INT__p_s_p_s[n * 9 + 3] = SIMINT_MUL(P_PA[1], PRIM_INT__s_s_p_s[n * 3 + 0]);
                        PRIM_INT__p_s_p_s[n * 9 + 3] = SIMINT_FMADD( aop_PQ[1], PRIM_INT__s_s_p_s[(n+1) * 3 + 0], PRIM_INT__p_s_p_s[n * 9 + 3]);

                        PRIM_INT__p_s_p_s[n * 9 + 4] = SIMINT_MUL(P_PA[1], PRIM_INT__s_s_p_s[n * 3 + 1]);
                        PRIM_INT__p_s_p_s[n * 9 + 4] = SIMINT_FMADD( aop_PQ[1], PRIM_INT__s_s_p_s[(n+1) * 3 + 1], PRIM_INT__p_s_p_s[n * 9 + 4]);
                        PRIM_INT__p_s_p_s[n * 9 + 4] = SIMINT_FMADD( vrr_const_1_over_2pq, PRIM_INT__s_s_s_s[(n+1) * 1 + 0], PRIM_INT__p_s_p_s[n * 9 + 4]);

                        PRIM_INT__p_s_p_s[n * 9 + 5] = SIMINT_MUL(P_PA[1], PRIM_INT__s_s_p_s[n * 3 + 2]);
                        PRIM_INT__p_s_p_s[n * 9 + 5] = SIMINT_FMADD( aop_PQ[1], PRIM_INT__s_s_p_s[(n+1) * 3 + 2], PRIM_INT__p_s_p_s[n * 9 + 5]);

                        PRIM_INT__p_s_p_s[n * 9 + 6] = SIMINT_MUL(P_PA[2], PRIM_INT__s_s_p_s[n * 3 + 0]);
                        PRIM_INT__p_s_p_s[n * 9 + 6] = SIMINT_FMADD( aop_PQ[2], PRIM_INT__s_s_p_s[(n+1) * 3 + 0], PRIM_INT__p_s_p_s[n * 9 + 6]);

                        PRIM_INT__p_s_p_s[n * 9 + 7] = SIMINT_MUL(P_PA[2], PRIM_INT__s_s_p_s[n * 3 + 1]);
                        PRIM_INT__p_s_p_s[n * 9 + 7] = SIMINT_FMADD( aop_PQ[2], PRIM_INT__s_s_p_s[(n+1) * 3 + 1], PRIM_INT__p_s_p_s[n * 9 + 7]);

                        PRIM_INT__p_s_p_s[n * 9 + 8] = SIMINT_MUL(P_PA[2], PRIM_INT__s_s_p_s[n * 3 + 2]);
                        PRIM_INT__p_s_p_s[n * 9 + 8] = SIMINT_FMADD( aop_PQ[2], PRIM_INT__s_s_p_s[(n+1) * 3 + 2], PRIM_INT__p_s_p_s[n * 9 + 8]);
                        PRIM_INT__p_s_p_s[n * 9 + 8] = SIMINT_FMADD( vrr_const_1_over_2pq, PRIM_INT__s_s_s_s[(n+1) * 1 + 0], PRIM_INT__p_s_p_s[n * 9 + 8]);

                    }


                    VRR_I_d_s_d_s(
                            PRIM_INT__d_s_d_s,
                            PRIM_INT__p_s_d_s,
                            PRIM_INT__s_s_d_s,
                            PRIM_INT__p_s_p_s,
                            P_PA,
                            a_over_p,
                            aop_PQ,
                            one_over_2p,
                            one_over_2pq,
                            11);


                    ostei_general_vrr_I(3, 0, 3, 0, 10,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__d_s_f_s, PRIM_INT__p_s_f_s, NULL, PRIM_INT__d_s_d_s, NULL, PRIM_INT__f_s_f_s);


                    ostei_general_vrr_I(4, 0, 4, 0, 9,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__f_s_g_s, PRIM_INT__d_s_g_s, NULL, PRIM_INT__f_s_f_s, NULL, PRIM_INT__g_s_g_s);


                    ostei_general_vrr_I(5, 0, 5, 0, 8,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__g_s_h_s, PRIM_INT__f_s_h_s, NULL, PRIM_INT__g_s_g_s, NULL, PRIM_INT__h_s_h_s);


                    ostei_general_vrr_I(6, 0, 6, 0, 7,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__h_s_i_s, PRIM_INT__g_s_i_s, NULL, PRIM_INT__h_s_h_s, NULL, PRIM_INT__i_s_i_s);


                    ostei_general_vrr_I(7, 0, 7, 0, 6,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__i_s_k_s, PRIM_INT__h_s_k_s, NULL, PRIM_INT__i_s_i_s, NULL, PRIM_INT__k_s_k_s);


                    ostei_general_vrr1_K(9, 17,
                            one_over_2q, a_over_q, aoq_PQ, Q_PA,
                            PRIM_INT__s_s_l_s, PRIM_INT__s_s_k_s, PRIM_INT__s_s_m_s);


                    ostei_general_vrr_I(1, 0, 9, 0, 12,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__s_s_m_s, NULL, NULL, PRIM_INT__s_s_l_s, NULL, PRIM_INT__p_s_m_s);


                    ostei_general_vrr_I(2, 0, 9, 0, 11,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__p_s_m_s, PRIM_INT__s_s_m_s, NULL, PRIM_INT__p_s_l_s, NULL, PRIM_INT__d_s_m_s);


                    ostei_general_vrr_I(3, 0, 9, 0, 10,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__d_s_m_s, PRIM_INT__p_s_m_s, NULL, PRIM_INT__d_s_l_s, NULL, PRIM_INT__f_s_m_s);


                    ostei_general_vrr_I(4, 0, 9, 0, 9,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__f_s_m_s, PRIM_INT__d_s_m_s, NULL, PRIM_INT__f_s_l_s, NULL, PRIM_INT__g_s_m_s);


                    ostei_general_vrr_I(5, 0, 9, 0, 8,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__g_s_m_s, PRIM_INT__f_s_m_s, NULL, PRIM_INT__g_s_l_s, NULL, PRIM_INT__h_s_m_s);


                    ostei_general_vrr_I(6, 0, 9, 0, 7,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__h_s_m_s, PRIM_INT__g_s_m_s, NULL, PRIM_INT__h_s_l_s, NULL, PRIM_INT__i_s_m_s);


                    ostei_general_vrr_I(7, 0, 8, 0, 6,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__i_s_l_s, PRIM_INT__h_s_l_s, NULL, PRIM_INT__i_s_k_s, NULL, PRIM_INT__k_s_l_s);



                    // Forming PRIM_INT__p_s_s_s[12 * 3];
                    for(n = 0; n < 12; ++n)  // loop over orders of auxiliary function
                    {

                        PRIM_INT__p_s_s_s[n * 3 + 0] = SIMINT_MUL(P_PA[0], PRIM_INT__s_s_s_s[n * 1 + 0]);
                        PRIM_INT__p_s_s_s[n * 3 + 0] = SIMINT_FMADD( aop_PQ[0], PRIM_INT__s_s_s_s[(n+1) * 1 + 0], PRIM_INT__p_s_s_s[n * 3 + 0]);

                        PRIM_INT__p_s_s_s[n * 3 + 1] = SIMINT_MUL(P_PA[1], PRIM_INT__s_s_s_s[n * 1 + 0]);
                        PRIM_INT__p_s_s_s[n * 3 + 1] = SIMINT_FMADD( aop_PQ[1], PRIM_INT__s_s_s_s[(n+1) * 1 + 0], PRIM_INT__p_s_s_s[n * 3 + 1]);

                        PRIM_INT__p_s_s_s[n * 3 + 2] = SIMINT_MUL(P_PA[2], PRIM_INT__s_s_s_s[n * 1 + 0]);
                        PRIM_INT__p_s_s_s[n * 3 + 2] = SIMINT_FMADD( aop_PQ[2], PRIM_INT__s_s_s_s[(n+1) * 1 + 0], PRIM_INT__p_s_s_s[n * 3 + 2]);

                    }



                    // Forming PRIM_INT__d_s_p_s[11 * 18];
                    for(n = 0; n < 11; ++n)  // loop over orders of auxiliary function
                    {

                        PRIM_INT__d_s_p_s[n * 18 + 0] = SIMINT_MUL(P_PA[0], PRIM_INT__p_s_p_s[n * 9 + 0]);
                        PRIM_INT__d_s_p_s[n * 18 + 0] = SIMINT_FMADD( aop_PQ[0], PRIM_INT__p_s_p_s[(n+1) * 9 + 0], PRIM_INT__d_s_p_s[n * 18 + 0]);
                        PRIM_INT__d_s_p_s[n * 18 + 0] = SIMINT_FMADD( vrr_const_1_over_2p, SIMINT_FMADD(a_over_p, PRIM_INT__s_s_p_s[(n+1) * 3 + 0], PRIM_INT__s_s_p_s[n * 3 + 0]), PRIM_INT__d_s_p_s[n * 18 + 0]);
                        PRIM_INT__d_s_p_s[n * 18 + 0] = SIMINT_FMADD( vrr_const_1_over_2pq, PRIM_INT__p_s_s_s[(n+1) * 3 + 0], PRIM_INT__d_s_p_s[n * 18 + 0]);

                        PRIM_INT__d_s_p_s[n * 18 + 1] = SIMINT_MUL(P_PA[0], PRIM_INT__p_s_p_s[n * 9 + 1]);
                        PRIM_INT__d_s_p_s[n * 18 + 1] = SIMINT_FMADD( aop_PQ[0], PRIM_INT__p_s_p_s[(n+1) * 9 + 1], PRIM_INT__d_s_p_s[n * 18 + 1]);
                        PRIM_INT__d_s_p_s[n * 18 + 1] = SIMINT_FMADD( vrr_const_1_over_2p, SIMINT_FMADD(a_over_p, PRIM_INT__s_s_p_s[(n+1) * 3 + 1], PRIM_INT__s_s_p_s[n * 3 + 1]), PRIM_INT__d_s_p_s[n * 18 + 1]);

                        PRIM_INT__d_s_p_s[n * 18 + 2] = SIMINT_MUL(P_PA[0], PRIM_INT__p_s_p_s[n * 9 + 2]);
                        PRIM_INT__d_s_p_s[n * 18 + 2] = SIMINT_FMADD( aop_PQ[0], PRIM_INT__p_s_p_s[(n+1) * 9 + 2], PRIM_INT__d_s_p_s[n * 18 + 2]);
                        PRIM_INT__d_s_p_s[n * 18 + 2] = SIMINT_FMADD( vrr_const_1_over_2p, SIMINT_FMADD(a_over_p, PRIM_INT__s_s_p_s[(n+1) * 3 + 2], PRIM_INT__s_s_p_s[n * 3 + 2]), PRIM_INT__d_s_p_s[n * 18 + 2]);

                        PRIM_INT__d_s_p_s[n * 18 + 9] = SIMINT_MUL(P_PA[1], PRIM_INT__p_s_p_s[n * 9 + 3]);
                        PRIM_INT__d_s_p_s[n * 18 + 9] = SIMINT_FMADD( aop_PQ[1], PRIM_INT__p_s_p_s[(n+1) * 9 + 3], PRIM_INT__d_s_p_s[n * 18 + 9]);
                        PRIM_INT__d_s_p_s[n * 18 + 9] = SIMINT_FMADD( vrr_const_1_over_2p, SIMINT_FMADD(a_over_p, PRIM_INT__s_s_p_s[(n+1) * 3 + 0], PRIM_INT__s_s_p_s[n * 3 + 0]), PRIM_INT__d_s_p_s[n * 18 + 9]);

                        PRIM_INT__d_s_p_s[n * 18 + 10] = SIMINT_MUL(P_PA[1], PRIM_INT__p_s_p_s[n * 9 + 4]);
                        PRIM_INT__d_s_p_s[n * 18 + 10] = SIMINT_FMADD( aop_PQ[1], PRIM_INT__p_s_p_s[(n+1) * 9 + 4], PRIM_INT__d_s_p_s[n * 18 + 10]);
                        PRIM_INT__d_s_p_s[n * 18 + 10] = SIMINT_FMADD( vrr_const_1_over_2p, SIMINT_FMADD(a_over_p, PRIM_INT__s_s_p_s[(n+1) * 3 + 1], PRIM_INT__s_s_p_s[n * 3 + 1]), PRIM_INT__d_s_p_s[n * 18 + 10]);
                        PRIM_INT__d_s_p_s[n * 18 + 10] = SIMINT_FMADD( vrr_const_1_over_2pq, PRIM_INT__p_s_s_s[(n+1) * 3 + 1], PRIM_INT__d_s_p_s[n * 18 + 10]);

                        PRIM_INT__d_s_p_s[n * 18 + 11] = SIMINT_MUL(P_PA[1], PRIM_INT__p_s_p_s[n * 9 + 5]);
                        PRIM_INT__d_s_p_s[n * 18 + 11] = SIMINT_FMADD( aop_PQ[1], PRIM_INT__p_s_p_s[(n+1) * 9 + 5], PRIM_INT__d_s_p_s[n * 18 + 11]);
                        PRIM_INT__d_s_p_s[n * 18 + 11] = SIMINT_FMADD( vrr_const_1_over_2p, SIMINT_FMADD(a_over_p, PRIM_INT__s_s_p_s[(n+1) * 3 + 2], PRIM_INT__s_s_p_s[n * 3 + 2]), PRIM_INT__d_s_p_s[n * 18 + 11]);

                        PRIM_INT__d_s_p_s[n * 18 + 15] = SIMINT_MUL(P_PA[2], PRIM_INT__p_s_p_s[n * 9 + 6]);
                        PRIM_INT__d_s_p_s[n * 18 + 15] = SIMINT_FMADD( aop_PQ[2], PRIM_INT__p_s_p_s[(n+1) * 9 + 6], PRIM_INT__d_s_p_s[n * 18 + 15]);
                        PRIM_INT__d_s_p_s[n * 18 + 15] = SIMINT_FMADD( vrr_const_1_over_2p, SIMINT_FMADD(a_over_p, PRIM_INT__s_s_p_s[(n+1) * 3 + 0], PRIM_INT__s_s_p_s[n * 3 + 0]), PRIM_INT__d_s_p_s[n * 18 + 15]);

                        PRIM_INT__d_s_p_s[n * 18 + 16] = SIMINT_MUL(P_PA[2], PRIM_INT__p_s_p_s[n * 9 + 7]);
                        PRIM_INT__d_s_p_s[n * 18 + 16] = SIMINT_FMADD( aop_PQ[2], PRIM_INT__p_s_p_s[(n+1) * 9 + 7], PRIM_INT__d_s_p_s[n * 18 + 16]);
                        PRIM_INT__d_s_p_s[n * 18 + 16] = SIMINT_FMADD( vrr_const_1_over_2p, SIMINT_FMADD(a_over_p, PRIM_INT__s_s_p_s[(n+1) * 3 + 1], PRIM_INT__s_s_p_s[n * 3 + 1]), PRIM_INT__d_s_p_s[n * 18 + 16]);

                        PRIM_INT__d_s_p_s[n * 18 + 17] = SIMINT_MUL(P_PA[2], PRIM_INT__p_s_p_s[n * 9 + 8]);
                        PRIM_INT__d_s_p_s[n * 18 + 17] = SIMINT_FMADD( aop_PQ[2], PRIM_INT__p_s_p_s[(n+1) * 9 + 8], PRIM_INT__d_s_p_s[n * 18 + 17]);
                        PRIM_INT__d_s_p_s[n * 18 + 17] = SIMINT_FMADD( vrr_const_1_over_2p, SIMINT_FMADD(a_over_p, PRIM_INT__s_s_p_s[(n+1) * 3 + 2], PRIM_INT__s_s_p_s[n * 3 + 2]), PRIM_INT__d_s_p_s[n * 18 + 17]);
                        PRIM_INT__d_s_p_s[n * 18 + 17] = SIMINT_FMADD( vrr_const_1_over_2pq, PRIM_INT__p_s_s_s[(n+1) * 3 + 2], PRIM_INT__d_s_p_s[n * 18 + 17]);

                    }


                    VRR_I_f_s_d_s(
                            PRIM_INT__f_s_d_s,
                            PRIM_INT__d_s_d_s,
                            PRIM_INT__p_s_d_s,
                            PRIM_INT__d_s_p_s,
                            P_PA,
                            a_over_p,
                            aop_PQ,
                            one_over_2p,
                            one_over_2pq,
                            10);


                    ostei_general_vrr_I(4, 0, 3, 0, 9,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__f_s_f_s, PRIM_INT__d_s_f_s, NULL, PRIM_INT__f_s_d_s, NULL, PRIM_INT__g_s_f_s);


                    ostei_general_vrr_I(5, 0, 4, 0, 8,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__g_s_g_s, PRIM_INT__f_s_g_s, NULL, PRIM_INT__g_s_f_s, NULL, PRIM_INT__h_s_g_s);


                    ostei_general_vrr_I(6, 0, 5, 0, 7,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__h_s_h_s, PRIM_INT__g_s_h_s, NULL, PRIM_INT__h_s_g_s, NULL, PRIM_INT__i_s_h_s);


                    ostei_general_vrr_I(7, 0, 6, 0, 6,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__i_s_i_s, PRIM_INT__h_s_i_s, NULL, PRIM_INT__i_s_h_s, NULL, PRIM_INT__k_s_i_s);


                    ostei_general_vrr_I(8, 0, 7, 0, 5,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__k_s_k_s, PRIM_INT__i_s_k_s, NULL, PRIM_INT__k_s_i_s, NULL, PRIM_INT__l_s_k_s);


                    ostei_general_vrr1_K(10, 16,
                            one_over_2q, a_over_q, aoq_PQ, Q_PA,
                            PRIM_INT__s_s_m_s, PRIM_INT__s_s_l_s, PRIM_INT__s_s_n_s);


                    ostei_general_vrr_I(1, 0, 10, 0, 12,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__s_s_n_s, NULL, NULL, PRIM_INT__s_s_m_s, NULL, PRIM_INT__p_s_n_s);


                    ostei_general_vrr_I(2, 0, 10, 0, 11,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__p_s_n_s, PRIM_INT__s_s_n_s, NULL, PRIM_INT__p_s_m_s, NULL, PRIM_INT__d_s_n_s);


                    ostei_general_vrr_I(3, 0, 10, 0, 10,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__d_s_n_s, PRIM_INT__p_s_n_s, NULL, PRIM_INT__d_s_m_s, NULL, PRIM_INT__f_s_n_s);


                    ostei_general_vrr_I(4, 0, 10, 0, 9,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__f_s_n_s, PRIM_INT__d_s_n_s, NULL, PRIM_INT__f_s_m_s, NULL, PRIM_INT__g_s_n_s);


                    ostei_general_vrr_I(5, 0, 10, 0, 8,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__g_s_n_s, PRIM_INT__f_s_n_s, NULL, PRIM_INT__g_s_m_s, NULL, PRIM_INT__h_s_n_s);


                    ostei_general_vrr_I(6, 0, 10, 0, 7,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__h_s_n_s, PRIM_INT__g_s_n_s, NULL, PRIM_INT__h_s_m_s, NULL, PRIM_INT__i_s_n_s);


                    ostei_general_vrr_I(7, 0, 9, 0, 6,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__i_s_m_s, PRIM_INT__h_s_m_s, NULL, PRIM_INT__i_s_l_s, NULL, PRIM_INT__k_s_m_s);


                    ostei_general_vrr_I(8, 0, 8, 0, 5,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__k_s_l_s, PRIM_INT__i_s_l_s, NULL, PRIM_INT__k_s_k_s, NULL, PRIM_INT__l_s_l_s);



                    // Forming PRIM_INT__d_s_s_s[11 * 6];
                    for(n = 0; n < 11; ++n)  // loop over orders of auxiliary function
                    {

                        PRIM_INT__d_s_s_s[n * 6 + 0] = SIMINT_MUL(P_PA[0], PRIM_INT__p_s_s_s[n * 3 + 0]);
                        PRIM_INT__d_s_s_s[n * 6 + 0] = SIMINT_FMADD( aop_PQ[0], PRIM_INT__p_s_s_s[(n+1) * 3 + 0], PRIM_INT__d_s_s_s[n * 6 + 0]);
                        PRIM_INT__d_s_s_s[n * 6 + 0] = SIMINT_FMADD( vrr_const_1_over_2p, SIMINT_FMADD(a_over_p, PRIM_INT__s_s_s_s[(n+1) * 1 + 0], PRIM_INT__s_s_s_s[n * 1 + 0]), PRIM_INT__d_s_s_s[n * 6 + 0]);

                        PRIM_INT__d_s_s_s[n * 6 + 3] = SIMINT_MUL(P_PA[1], PRIM_INT__p_s_s_s[n * 3 + 1]);
                        PRIM_INT__d_s_s_s[n * 6 + 3] = SIMINT_FMADD( aop_PQ[1], PRIM_INT__p_s_s_s[(n+1) * 3 + 1], PRIM_INT__d_s_s_s[n * 6 + 3]);
                        PRIM_INT__d_s_s_s[n * 6 + 3] = SIMINT_FMADD( vrr_const_1_over_2p, SIMINT_FMADD(a_over_p, PRIM_INT__s_s_s_s[(n+1) * 1 + 0], PRIM_INT__s_s_s_s[n * 1 + 0]), PRIM_INT__d_s_s_s[n * 6 + 3]);

                        PRIM_INT__d_s_s_s[n * 6 + 5] = SIMINT_MUL(P_PA[2], PRIM_INT__p_s_s_s[n * 3 + 2]);
                        PRIM_INT__d_s_s_s[n * 6 + 5] = SIMINT_FMADD( aop_PQ[2], PRIM_INT__p_s_s_s[(n+1) * 3 + 2], PRIM_INT__d_s_s_s[n * 6 + 5]);
                        PRIM_INT__d_s_s_s[n * 6 + 5] = SIMINT_FMADD( vrr_const_1_over_2p, SIMINT_FMADD(a_over_p, PRIM_INT__s_s_s_s[(n+1) * 1 + 0], PRIM_INT__s_s_s_s[n * 1 + 0]), PRIM_INT__d_s_s_s[n * 6 + 5]);

                    }


                    VRR_I_f_s_p_s(
                            PRIM_INT__f_s_p_s,
                            PRIM_INT__d_s_p_s,
                            PRIM_INT__p_s_p_s,
                            PRIM_INT__d_s_s_s,
                            P_PA,
                            a_over_p,
                            aop_PQ,
                            one_over_2p,
                            one_over_2pq,
                            10);


                    ostei_general_vrr_I(4, 0, 2, 0, 9,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__f_s_d_s, PRIM_INT__d_s_d_s, NULL, PRIM_INT__f_s_p_s, NULL, PRIM_INT__g_s_d_s);


                    ostei_general_vrr_I(5, 0, 3, 0, 8,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__g_s_f_s, PRIM_INT__f_s_f_s, NULL, PRIM_INT__g_s_d_s, NULL, PRIM_INT__h_s_f_s);


                    ostei_general_vrr_I(6, 0, 4, 0, 7,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__h_s_g_s, PRIM_INT__g_s_g_s, NULL, PRIM_INT__h_s_f_s, NULL, PRIM_INT__i_s_g_s);


                    ostei_general_vrr_I(7, 0, 5, 0, 6,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__i_s_h_s, PRIM_INT__h_s_h_s, NULL, PRIM_INT__i_s_g_s, NULL, PRIM_INT__k_s_h_s);


                    ostei_general_vrr_I(8, 0, 6, 0, 5,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__k_s_i_s, PRIM_INT__i_s_i_s, NULL, PRIM_INT__k_s_h_s, NULL, PRIM_INT__l_s_i_s);


                    ostei_general_vrr_I(9, 0, 7, 0, 4,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__l_s_k_s, PRIM_INT__k_s_k_s, NULL, PRIM_INT__l_s_i_s, NULL, PRIM_INT__m_s_k_s);


                    ostei_general_vrr1_K(11, 15,
                            one_over_2q, a_over_q, aoq_PQ, Q_PA,
                            PRIM_INT__s_s_n_s, PRIM_INT__s_s_m_s, PRIM_INT__s_s_o_s);


                    ostei_general_vrr_I(1, 0, 11, 0, 12,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__s_s_o_s, NULL, NULL, PRIM_INT__s_s_n_s, NULL, PRIM_INT__p_s_o_s);


                    ostei_general_vrr_I(2, 0, 11, 0, 11,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__p_s_o_s, PRIM_INT__s_s_o_s, NULL, PRIM_INT__p_s_n_s, NULL, PRIM_INT__d_s_o_s);


                    ostei_general_vrr_I(3, 0, 11, 0, 10,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__d_s_o_s, PRIM_INT__p_s_o_s, NULL, PRIM_INT__d_s_n_s, NULL, PRIM_INT__f_s_o_s);


                    ostei_general_vrr_I(4, 0, 11, 0, 9,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__f_s_o_s, PRIM_INT__d_s_o_s, NULL, PRIM_INT__f_s_n_s, NULL, PRIM_INT__g_s_o_s);


                    ostei_general_vrr_I(5, 0, 11, 0, 8,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__g_s_o_s, PRIM_INT__f_s_o_s, NULL, PRIM_INT__g_s_n_s, NULL, PRIM_INT__h_s_o_s);


                    ostei_general_vrr_I(6, 0, 11, 0, 7,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__h_s_o_s, PRIM_INT__g_s_o_s, NULL, PRIM_INT__h_s_n_s, NULL, PRIM_INT__i_s_o_s);


                    ostei_general_vrr_I(7, 0, 10, 0, 6,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__i_s_n_s, PRIM_INT__h_s_n_s, NULL, PRIM_INT__i_s_m_s, NULL, PRIM_INT__k_s_n_s);


                    ostei_general_vrr_I(8, 0, 9, 0, 5,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__k_s_m_s, PRIM_INT__i_s_m_s, NULL, PRIM_INT__k_s_l_s, NULL, PRIM_INT__l_s_m_s);


                    ostei_general_vrr_I(9, 0, 8, 0, 4,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__l_s_l_s, PRIM_INT__k_s_l_s, NULL, PRIM_INT__l_s_k_s, NULL, PRIM_INT__m_s_l_s);



                    // Forming PRIM_INT__f_s_s_s[10 * 10];
                    for(n = 0; n < 10; ++n)  // loop over orders of auxiliary function
                    {

                        PRIM_INT__f_s_s_s[n * 10 + 0] = SIMINT_MUL(P_PA[0], PRIM_INT__d_s_s_s[n * 6 + 0]);
                        PRIM_INT__f_s_s_s[n * 10 + 0] = SIMINT_FMADD( aop_PQ[0], PRIM_INT__d_s_s_s[(n+1) * 6 + 0], PRIM_INT__f_s_s_s[n * 10 + 0]);
                        PRIM_INT__f_s_s_s[n * 10 + 0] = SIMINT_FMADD( vrr_const_2_over_2p, SIMINT_FMADD(a_over_p, PRIM_INT__p_s_s_s[(n+1) * 3 + 0], PRIM_INT__p_s_s_s[n * 3 + 0]), PRIM_INT__f_s_s_s[n * 10 + 0]);

                        PRIM_INT__f_s_s_s[n * 10 + 6] = SIMINT_MUL(P_PA[1], PRIM_INT__d_s_s_s[n * 6 + 3]);
                        PRIM_INT__f_s_s_s[n * 10 + 6] = SIMINT_FMADD( aop_PQ[1], PRIM_INT__d_s_s_s[(n+1) * 6 + 3], PRIM_INT__f_s_s_s[n * 10 + 6]);
                        PRIM_INT__f_s_s_s[n * 10 + 6] = SIMINT_FMADD( vrr_const_2_over_2p, SIMINT_FMADD(a_over_p, PRIM_INT__p_s_s_s[(n+1) * 3 + 1], PRIM_INT__p_s_s_s[n * 3 + 1]), PRIM_INT__f_s_s_s[n * 10 + 6]);

                        PRIM_INT__f_s_s_s[n * 10 + 9] = SIMINT_MUL(P_PA[2], PRIM_INT__d_s_s_s[n * 6 + 5]);
                        PRIM_INT__f_s_s_s[n * 10 + 9] = SIMINT_FMADD( aop_PQ[2], PRIM_INT__d_s_s_s[(n+1) * 6 + 5], PRIM_INT__f_s_s_s[n * 10 + 9]);
                        PRIM_INT__f_s_s_s[n * 10 + 9] = SIMINT_FMADD( vrr_const_2_over_2p, SIMINT_FMADD(a_over_p, PRIM_INT__p_s_s_s[(n+1) * 3 + 2], PRIM_INT__p_s_s_s[n * 3 + 2]), PRIM_INT__f_s_s_s[n * 10 + 9]);

                    }


                    VRR_I_g_s_p_s(
                            PRIM_INT__g_s_p_s,
                            PRIM_INT__f_s_p_s,
                            PRIM_INT__d_s_p_s,
                            PRIM_INT__f_s_s_s,
                            P_PA,
                            a_over_p,
                            aop_PQ,
                            one_over_2p,
                            one_over_2pq,
                            9);


                    ostei_general_vrr_I(5, 0, 2, 0, 8,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__g_s_d_s, PRIM_INT__f_s_d_s, NULL, PRIM_INT__g_s_p_s, NULL, PRIM_INT__h_s_d_s);


                    ostei_general_vrr_I(6, 0, 3, 0, 7,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__h_s_f_s, PRIM_INT__g_s_f_s, NULL, PRIM_INT__h_s_d_s, NULL, PRIM_INT__i_s_f_s);


                    ostei_general_vrr_I(7, 0, 4, 0, 6,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__i_s_g_s, PRIM_INT__h_s_g_s, NULL, PRIM_INT__i_s_f_s, NULL, PRIM_INT__k_s_g_s);


                    ostei_general_vrr_I(8, 0, 5, 0, 5,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__k_s_h_s, PRIM_INT__i_s_h_s, NULL, PRIM_INT__k_s_g_s, NULL, PRIM_INT__l_s_h_s);


                    ostei_general_vrr_I(9, 0, 6, 0, 4,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__l_s_i_s, PRIM_INT__k_s_i_s, NULL, PRIM_INT__l_s_h_s, NULL, PRIM_INT__m_s_i_s);


                    ostei_general_vrr_I(10, 0, 7, 0, 3,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__m_s_k_s, PRIM_INT__l_s_k_s, NULL, PRIM_INT__m_s_i_s, NULL, PRIM_INT__n_s_k_s);


                    ostei_general_vrr1_K(12, 14,
                            one_over_2q, a_over_q, aoq_PQ, Q_PA,
                            PRIM_INT__s_s_o_s, PRIM_INT__s_s_n_s, PRIM_INT__s_s_q_s);


                    ostei_general_vrr_I(1, 0, 12, 0, 12,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__s_s_q_s, NULL, NULL, PRIM_INT__s_s_o_s, NULL, PRIM_INT__p_s_q_s);


                    ostei_general_vrr_I(2, 0, 12, 0, 11,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__p_s_q_s, PRIM_INT__s_s_q_s, NULL, PRIM_INT__p_s_o_s, NULL, PRIM_INT__d_s_q_s);


                    ostei_general_vrr_I(3, 0, 12, 0, 10,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__d_s_q_s, PRIM_INT__p_s_q_s, NULL, PRIM_INT__d_s_o_s, NULL, PRIM_INT__f_s_q_s);


                    ostei_general_vrr_I(4, 0, 12, 0, 9,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__f_s_q_s, PRIM_INT__d_s_q_s, NULL, PRIM_INT__f_s_o_s, NULL, PRIM_INT__g_s_q_s);


                    ostei_general_vrr_I(5, 0, 12, 0, 8,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__g_s_q_s, PRIM_INT__f_s_q_s, NULL, PRIM_INT__g_s_o_s, NULL, PRIM_INT__h_s_q_s);


                    ostei_general_vrr_I(6, 0, 12, 0, 7,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__h_s_q_s, PRIM_INT__g_s_q_s, NULL, PRIM_INT__h_s_o_s, NULL, PRIM_INT__i_s_q_s);


                    ostei_general_vrr_I(7, 0, 11, 0, 6,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__i_s_o_s, PRIM_INT__h_s_o_s, NULL, PRIM_INT__i_s_n_s, NULL, PRIM_INT__k_s_o_s);


                    ostei_general_vrr_I(8, 0, 10, 0, 5,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__k_s_n_s, PRIM_INT__i_s_n_s, NULL, PRIM_INT__k_s_m_s, NULL, PRIM_INT__l_s_n_s);


                    ostei_general_vrr_I(9, 0, 9, 0, 4,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__l_s_m_s, PRIM_INT__k_s_m_s, NULL, PRIM_INT__l_s_l_s, NULL, PRIM_INT__m_s_m_s);


                    ostei_general_vrr_I(10, 0, 8, 0, 3,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__m_s_l_s, PRIM_INT__l_s_l_s, NULL, PRIM_INT__m_s_k_s, NULL, PRIM_INT__n_s_l_s);


                    VRR_I_g_s_s_s(
                            PRIM_INT__g_s_s_s,
                            PRIM_INT__f_s_s_s,
                            PRIM_INT__d_s_s_s,
                            P_PA,
                            a_over_p,
                            aop_PQ,
                            one_over_2p,
                            9);


                    ostei_general_vrr_I(5, 0, 1, 0, 8,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__g_s_p_s, PRIM_INT__f_s_p_s, NULL, PRIM_INT__g_s_s_s, NULL, PRIM_INT__h_s_p_s);


                    ostei_general_vrr_I(6, 0, 2, 0, 7,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__h_s_d_s, PRIM_INT__g_s_d_s, NULL, PRIM_INT__h_s_p_s, NULL, PRIM_INT__i_s_d_s);


                    ostei_general_vrr_I(7, 0, 3, 0, 6,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__i_s_f_s, PRIM_INT__h_s_f_s, NULL, PRIM_INT__i_s_d_s, NULL, PRIM_INT__k_s_f_s);


                    ostei_general_vrr_I(8, 0, 4, 0, 5,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__k_s_g_s, PRIM_INT__i_s_g_s, NULL, PRIM_INT__k_s_f_s, NULL, PRIM_INT__l_s_g_s);


                    ostei_general_vrr_I(9, 0, 5, 0, 4,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__l_s_h_s, PRIM_INT__k_s_h_s, NULL, PRIM_INT__l_s_g_s, NULL, PRIM_INT__m_s_h_s);


                    ostei_general_vrr_I(10, 0, 6, 0, 3,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__m_s_i_s, PRIM_INT__l_s_i_s, NULL, PRIM_INT__m_s_h_s, NULL, PRIM_INT__n_s_i_s);


                    ostei_general_vrr_I(11, 0, 7, 0, 2,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__n_s_k_s, PRIM_INT__m_s_k_s, NULL, PRIM_INT__n_s_i_s, NULL, PRIM_INT__o_s_k_s);


                    ostei_general_vrr1_K(13, 13,
                            one_over_2q, a_over_q, aoq_PQ, Q_PA,
                            PRIM_INT__s_s_q_s, PRIM_INT__s_s_o_s, PRIM_INT__s_s_r_s);


                    ostei_general_vrr_I(1, 0, 13, 0, 12,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__s_s_r_s, NULL, NULL, PRIM_INT__s_s_q_s, NULL, PRIM_INT__p_s_r_s);


                    ostei_general_vrr_I(2, 0, 13, 0, 11,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__p_s_r_s, PRIM_INT__s_s_r_s, NULL, PRIM_INT__p_s_q_s, NULL, PRIM_INT__d_s_r_s);


                    ostei_general_vrr_I(3, 0, 13, 0, 10,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__d_s_r_s, PRIM_INT__p_s_r_s, NULL, PRIM_INT__d_s_q_s, NULL, PRIM_INT__f_s_r_s);


                    ostei_general_vrr_I(4, 0, 13, 0, 9,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__f_s_r_s, PRIM_INT__d_s_r_s, NULL, PRIM_INT__f_s_q_s, NULL, PRIM_INT__g_s_r_s);


                    ostei_general_vrr_I(5, 0, 13, 0, 8,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__g_s_r_s, PRIM_INT__f_s_r_s, NULL, PRIM_INT__g_s_q_s, NULL, PRIM_INT__h_s_r_s);


                    ostei_general_vrr_I(6, 0, 13, 0, 7,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__h_s_r_s, PRIM_INT__g_s_r_s, NULL, PRIM_INT__h_s_q_s, NULL, PRIM_INT__i_s_r_s);


                    ostei_general_vrr_I(7, 0, 12, 0, 6,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__i_s_q_s, PRIM_INT__h_s_q_s, NULL, PRIM_INT__i_s_o_s, NULL, PRIM_INT__k_s_q_s);


                    ostei_general_vrr_I(8, 0, 11, 0, 5,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__k_s_o_s, PRIM_INT__i_s_o_s, NULL, PRIM_INT__k_s_n_s, NULL, PRIM_INT__l_s_o_s);


                    ostei_general_vrr_I(9, 0, 10, 0, 4,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__l_s_n_s, PRIM_INT__k_s_n_s, NULL, PRIM_INT__l_s_m_s, NULL, PRIM_INT__m_s_n_s);


                    ostei_general_vrr_I(10, 0, 9, 0, 3,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__m_s_m_s, PRIM_INT__l_s_m_s, NULL, PRIM_INT__m_s_l_s, NULL, PRIM_INT__n_s_m_s);


                    ostei_general_vrr_I(11, 0, 8, 0, 2,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__n_s_l_s, PRIM_INT__m_s_l_s, NULL, PRIM_INT__n_s_k_s, NULL, PRIM_INT__o_s_l_s);


                    VRR_I_h_s_s_s(
                            PRIM_INT__h_s_s_s,
                            PRIM_INT__g_s_s_s,
                            PRIM_INT__f_s_s_s,
                            P_PA,
                            a_over_p,
                            aop_PQ,
                            one_over_2p,
                            8);


                    ostei_general_vrr_I(6, 0, 1, 0, 7,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__h_s_p_s, PRIM_INT__g_s_p_s, NULL, PRIM_INT__h_s_s_s, NULL, PRIM_INT__i_s_p_s);


                    ostei_general_vrr_I(7, 0, 2, 0, 6,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__i_s_d_s, PRIM_INT__h_s_d_s, NULL, PRIM_INT__i_s_p_s, NULL, PRIM_INT__k_s_d_s);


                    ostei_general_vrr_I(8, 0, 3, 0, 5,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__k_s_f_s, PRIM_INT__i_s_f_s, NULL, PRIM_INT__k_s_d_s, NULL, PRIM_INT__l_s_f_s);


                    ostei_general_vrr_I(9, 0, 4, 0, 4,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__l_s_g_s, PRIM_INT__k_s_g_s, NULL, PRIM_INT__l_s_f_s, NULL, PRIM_INT__m_s_g_s);


                    ostei_general_vrr_I(10, 0, 5, 0, 3,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__m_s_h_s, PRIM_INT__l_s_h_s, NULL, PRIM_INT__m_s_g_s, NULL, PRIM_INT__n_s_h_s);


                    ostei_general_vrr_I(11, 0, 6, 0, 2,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__n_s_i_s, PRIM_INT__m_s_i_s, NULL, PRIM_INT__n_s_h_s, NULL, PRIM_INT__o_s_i_s);


                    ostei_general_vrr_I(12, 0, 7, 0, 1,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__o_s_k_s, PRIM_INT__n_s_k_s, NULL, PRIM_INT__o_s_i_s, NULL, PRIM_INT__q_s_k_s);


                    ostei_general_vrr_I(7, 0, 13, 0, 6,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__i_s_r_s, PRIM_INT__h_s_r_s, NULL, PRIM_INT__i_s_q_s, NULL, PRIM_INT__k_s_r_s);


                    ostei_general_vrr_I(8, 0, 12, 0, 5,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__k_s_q_s, PRIM_INT__i_s_q_s, NULL, PRIM_INT__k_s_o_s, NULL, PRIM_INT__l_s_q_s);


                    ostei_general_vrr_I(9, 0, 11, 0, 4,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__l_s_o_s, PRIM_INT__k_s_o_s, NULL, PRIM_INT__l_s_n_s, NULL, PRIM_INT__m_s_o_s);


                    ostei_general_vrr_I(10, 0, 10, 0, 3,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__m_s_n_s, PRIM_INT__l_s_n_s, NULL, PRIM_INT__m_s_m_s, NULL, PRIM_INT__n_s_n_s);


                    ostei_general_vrr_I(11, 0, 9, 0, 2,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__n_s_m_s, PRIM_INT__m_s_m_s, NULL, PRIM_INT__n_s_l_s, NULL, PRIM_INT__o_s_m_s);


                    ostei_general_vrr_I(12, 0, 8, 0, 1,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__o_s_l_s, PRIM_INT__n_s_l_s, NULL, PRIM_INT__o_s_k_s, NULL, PRIM_INT__q_s_l_s);


                    ostei_general_vrr_I(8, 0, 13, 0, 5,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__k_s_r_s, PRIM_INT__i_s_r_s, NULL, PRIM_INT__k_s_q_s, NULL, PRIM_INT__l_s_r_s);


                    ostei_general_vrr_I(9, 0, 12, 0, 4,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__l_s_q_s, PRIM_INT__k_s_q_s, NULL, PRIM_INT__l_s_o_s, NULL, PRIM_INT__m_s_q_s);


                    ostei_general_vrr_I(10, 0, 11, 0, 3,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__m_s_o_s, PRIM_INT__l_s_o_s, NULL, PRIM_INT__m_s_n_s, NULL, PRIM_INT__n_s_o_s);


                    ostei_general_vrr_I(11, 0, 10, 0, 2,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__n_s_n_s, PRIM_INT__m_s_n_s, NULL, PRIM_INT__n_s_m_s, NULL, PRIM_INT__o_s_n_s);


                    ostei_general_vrr_I(12, 0, 9, 0, 1,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__o_s_m_s, PRIM_INT__n_s_m_s, NULL, PRIM_INT__o_s_l_s, NULL, PRIM_INT__q_s_m_s);


                    ostei_general_vrr_I(9, 0, 13, 0, 4,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__l_s_r_s, PRIM_INT__k_s_r_s, NULL, PRIM_INT__l_s_q_s, NULL, PRIM_INT__m_s_r_s);


                    ostei_general_vrr_I(10, 0, 12, 0, 3,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__m_s_q_s, PRIM_INT__l_s_q_s, NULL, PRIM_INT__m_s_o_s, NULL, PRIM_INT__n_s_q_s);


                    ostei_general_vrr_I(11, 0, 11, 0, 2,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__n_s_o_s, PRIM_INT__m_s_o_s, NULL, PRIM_INT__n_s_n_s, NULL, PRIM_INT__o_s_o_s);


                    ostei_general_vrr_I(12, 0, 10, 0, 1,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__o_s_n_s, PRIM_INT__n_s_n_s, NULL, PRIM_INT__o_s_m_s, NULL, PRIM_INT__q_s_n_s);


                    ostei_general_vrr_I(10, 0, 13, 0, 3,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__m_s_r_s, PRIM_INT__l_s_r_s, NULL, PRIM_INT__m_s_q_s, NULL, PRIM_INT__n_s_r_s);


                    ostei_general_vrr_I(11, 0, 12, 0, 2,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__n_s_q_s, PRIM_INT__m_s_q_s, NULL, PRIM_INT__n_s_o_s, NULL, PRIM_INT__o_s_q_s);


                    ostei_general_vrr_I(12, 0, 11, 0, 1,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__o_s_o_s, PRIM_INT__n_s_o_s, NULL, PRIM_INT__o_s_n_s, NULL, PRIM_INT__q_s_o_s);


                    ostei_general_vrr_I(11, 0, 13, 0, 2,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__n_s_r_s, PRIM_INT__m_s_r_s, NULL, PRIM_INT__n_s_q_s, NULL, PRIM_INT__o_s_r_s);


                    ostei_general_vrr_I(12, 0, 12, 0, 1,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__o_s_q_s, PRIM_INT__n_s_q_s, NULL, PRIM_INT__o_s_o_s, NULL, PRIM_INT__q_s_q_s);


                    ostei_general_vrr_I(12, 0, 13, 0, 1,
                            one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
                            PRIM_INT__o_s_r_s, PRIM_INT__n_s_r_s, NULL, PRIM_INT__o_s_q_s, NULL, PRIM_INT__q_s_r_s);




                    ////////////////////////////////////
                    // Accumulate contracted integrals
                    ////////////////////////////////////
                    if(lastoffset == 0)
                    {
                        contract_all(1008, PRIM_INT__i_s_k_s, PRIM_PTR_INT__i_s_k_s);
                        contract_all(1260, PRIM_INT__i_s_l_s, PRIM_PTR_INT__i_s_l_s);
                        contract_all(1540, PRIM_INT__i_s_m_s, PRIM_PTR_INT__i_s_m_s);
                        contract_all(1848, PRIM_INT__i_s_n_s, PRIM_PTR_INT__i_s_n_s);
                        contract_all(2184, PRIM_INT__i_s_o_s, PRIM_PTR_INT__i_s_o_s);
                        contract_all(2548, PRIM_INT__i_s_q_s, PRIM_PTR_INT__i_s_q_s);
                        contract_all(2940, PRIM_INT__i_s_r_s, PRIM_PTR_INT__i_s_r_s);
                        contract_all(1296, PRIM_INT__k_s_k_s, PRIM_PTR_INT__k_s_k_s);
                        contract_all(1620, PRIM_INT__k_s_l_s, PRIM_PTR_INT__k_s_l_s);
                        contract_all(1980, PRIM_INT__k_s_m_s, PRIM_PTR_INT__k_s_m_s);
                        contract_all(2376, PRIM_INT__k_s_n_s, PRIM_PTR_INT__k_s_n_s);
                        contract_all(2808, PRIM_INT__k_s_o_s, PRIM_PTR_INT__k_s_o_s);
                        contract_all(3276, PRIM_INT__k_s_q_s, PRIM_PTR_INT__k_s_q_s);
                        contract_all(3780, PRIM_INT__k_s_r_s, PRIM_PTR_INT__k_s_r_s);
                        contract_all(1620, PRIM_INT__l_s_k_s, PRIM_PTR_INT__l_s_k_s);
                        contract_all(2025, PRIM_INT__l_s_l_s, PRIM_PTR_INT__l_s_l_s);
                        contract_all(2475, PRIM_INT__l_s_m_s, PRIM_PTR_INT__l_s_m_s);
                        contract_all(2970, PRIM_INT__l_s_n_s, PRIM_PTR_INT__l_s_n_s);
                        contract_all(3510, PRIM_INT__l_s_o_s, PRIM_PTR_INT__l_s_o_s);
                        contract_all(4095, PRIM_INT__l_s_q_s, PRIM_PTR_INT__l_s_q_s);
                        contract_all(4725, PRIM_INT__l_s_r_s, PRIM_PTR_INT__l_s_r_s);
                        contract_all(1980, PRIM_INT__m_s_k_s, PRIM_PTR_INT__m_s_k_s);
                        contract_all(2475, PRIM_INT__m_s_l_s, PRIM_PTR_INT__m_s_l_s);
                        contract_all(3025, PRIM_INT__m_s_m_s, PRIM_PTR_INT__m_s_m_s);
                        contract_all(3630, PRIM_INT__m_s_n_s, PRIM_PTR_INT__m_s_n_s);
                        contract_all(4290, PRIM_INT__m_s_o_s, PRIM_PTR_INT__m_s_o_s);
                        contract_all(5005, PRIM_INT__m_s_q_s, PRIM_PTR_INT__m_s_q_s);
                        contract_all(5775, PRIM_INT__m_s_r_s, PRIM_PTR_INT__m_s_r_s);
                        contract_all(2376, PRIM_INT__n_s_k_s, PRIM_PTR_INT__n_s_k_s);
                        contract_all(2970, PRIM_INT__n_s_l_s, PRIM_PTR_INT__n_s_l_s);
                        contract_all(3630, PRIM_INT__n_s_m_s, PRIM_PTR_INT__n_s_m_s);
                        contract_all(4356, PRIM_INT__n_s_n_s, PRIM_PTR_INT__n_s_n_s);
                        contract_all(5148, PRIM_INT__n_s_o_s, PRIM_PTR_INT__n_s_o_s);
                        contract_all(6006, PRIM_INT__n_s_q_s, PRIM_PTR_INT__n_s_q_s);
                        contract_all(6930, PRIM_INT__n_s_r_s, PRIM_PTR_INT__n_s_r_s);
                        contract_all(2808, PRIM_INT__o_s_k_s, PRIM_PTR_INT__o_s_k_s);
                        contract_all(3510, PRIM_INT__o_s_l_s, PRIM_PTR_INT__o_s_l_s);
                        contract_all(4290, PRIM_INT__o_s_m_s, PRIM_PTR_INT__o_s_m_s);
                        contract_all(5148, PRIM_INT__o_s_n_s, PRIM_PTR_INT__o_s_n_s);
                        contract_all(6084, PRIM_INT__o_s_o_s, PRIM_PTR_INT__o_s_o_s);
                        contract_all(7098, PRIM_INT__o_s_q_s, PRIM_PTR_INT__o_s_q_s);
                        contract_all(8190, PRIM_INT__o_s_r_s, PRIM_PTR_INT__o_s_r_s);
                        contract_all(3276, PRIM_INT__q_s_k_s, PRIM_PTR_INT__q_s_k_s);
                        contract_all(4095, PRIM_INT__q_s_l_s, PRIM_PTR_INT__q_s_l_s);
                        contract_all(5005, PRIM_INT__q_s_m_s, PRIM_PTR_INT__q_s_m_s);
                        contract_all(6006, PRIM_INT__q_s_n_s, PRIM_PTR_INT__q_s_n_s);
                        contract_all(7098, PRIM_INT__q_s_o_s, PRIM_PTR_INT__q_s_o_s);
                        contract_all(8281, PRIM_INT__q_s_q_s, PRIM_PTR_INT__q_s_q_s);
                        contract_all(9555, PRIM_INT__q_s_r_s, PRIM_PTR_INT__q_s_r_s);
                    }
                    else
                    {
                        contract(1008, shelloffsets, PRIM_INT__i_s_k_s, PRIM_PTR_INT__i_s_k_s);
                        contract(1260, shelloffsets, PRIM_INT__i_s_l_s, PRIM_PTR_INT__i_s_l_s);
                        contract(1540, shelloffsets, PRIM_INT__i_s_m_s, PRIM_PTR_INT__i_s_m_s);
                        contract(1848, shelloffsets, PRIM_INT__i_s_n_s, PRIM_PTR_INT__i_s_n_s);
                        contract(2184, shelloffsets, PRIM_INT__i_s_o_s, PRIM_PTR_INT__i_s_o_s);
                        contract(2548, shelloffsets, PRIM_INT__i_s_q_s, PRIM_PTR_INT__i_s_q_s);
                        contract(2940, shelloffsets, PRIM_INT__i_s_r_s, PRIM_PTR_INT__i_s_r_s);
                        contract(1296, shelloffsets, PRIM_INT__k_s_k_s, PRIM_PTR_INT__k_s_k_s);
                        contract(1620, shelloffsets, PRIM_INT__k_s_l_s, PRIM_PTR_INT__k_s_l_s);
                        contract(1980, shelloffsets, PRIM_INT__k_s_m_s, PRIM_PTR_INT__k_s_m_s);
                        contract(2376, shelloffsets, PRIM_INT__k_s_n_s, PRIM_PTR_INT__k_s_n_s);
                        contract(2808, shelloffsets, PRIM_INT__k_s_o_s, PRIM_PTR_INT__k_s_o_s);
                        contract(3276, shelloffsets, PRIM_INT__k_s_q_s, PRIM_PTR_INT__k_s_q_s);
                        contract(3780, shelloffsets, PRIM_INT__k_s_r_s, PRIM_PTR_INT__k_s_r_s);
                        contract(1620, shelloffsets, PRIM_INT__l_s_k_s, PRIM_PTR_INT__l_s_k_s);
                        contract(2025, shelloffsets, PRIM_INT__l_s_l_s, PRIM_PTR_INT__l_s_l_s);
                        contract(2475, shelloffsets, PRIM_INT__l_s_m_s, PRIM_PTR_INT__l_s_m_s);
                        contract(2970, shelloffsets, PRIM_INT__l_s_n_s, PRIM_PTR_INT__l_s_n_s);
                        contract(3510, shelloffsets, PRIM_INT__l_s_o_s, PRIM_PTR_INT__l_s_o_s);
                        contract(4095, shelloffsets, PRIM_INT__l_s_q_s, PRIM_PTR_INT__l_s_q_s);
                        contract(4725, shelloffsets, PRIM_INT__l_s_r_s, PRIM_PTR_INT__l_s_r_s);
                        contract(1980, shelloffsets, PRIM_INT__m_s_k_s, PRIM_PTR_INT__m_s_k_s);
                        contract(2475, shelloffsets, PRIM_INT__m_s_l_s, PRIM_PTR_INT__m_s_l_s);
                        contract(3025, shelloffsets, PRIM_INT__m_s_m_s, PRIM_PTR_INT__m_s_m_s);
                        contract(3630, shelloffsets, PRIM_INT__m_s_n_s, PRIM_PTR_INT__m_s_n_s);
                        contract(4290, shelloffsets, PRIM_INT__m_s_o_s, PRIM_PTR_INT__m_s_o_s);
                        contract(5005, shelloffsets, PRIM_INT__m_s_q_s, PRIM_PTR_INT__m_s_q_s);
                        contract(5775, shelloffsets, PRIM_INT__m_s_r_s, PRIM_PTR_INT__m_s_r_s);
                        contract(2376, shelloffsets, PRIM_INT__n_s_k_s, PRIM_PTR_INT__n_s_k_s);
                        contract(2970, shelloffsets, PRIM_INT__n_s_l_s, PRIM_PTR_INT__n_s_l_s);
                        contract(3630, shelloffsets, PRIM_INT__n_s_m_s, PRIM_PTR_INT__n_s_m_s);
                        contract(4356, shelloffsets, PRIM_INT__n_s_n_s, PRIM_PTR_INT__n_s_n_s);
                        contract(5148, shelloffsets, PRIM_INT__n_s_o_s, PRIM_PTR_INT__n_s_o_s);
                        contract(6006, shelloffsets, PRIM_INT__n_s_q_s, PRIM_PTR_INT__n_s_q_s);
                        contract(6930, shelloffsets, PRIM_INT__n_s_r_s, PRIM_PTR_INT__n_s_r_s);
                        contract(2808, shelloffsets, PRIM_INT__o_s_k_s, PRIM_PTR_INT__o_s_k_s);
                        contract(3510, shelloffsets, PRIM_INT__o_s_l_s, PRIM_PTR_INT__o_s_l_s);
                        contract(4290, shelloffsets, PRIM_INT__o_s_m_s, PRIM_PTR_INT__o_s_m_s);
                        contract(5148, shelloffsets, PRIM_INT__o_s_n_s, PRIM_PTR_INT__o_s_n_s);
                        contract(6084, shelloffsets, PRIM_INT__o_s_o_s, PRIM_PTR_INT__o_s_o_s);
                        contract(7098, shelloffsets, PRIM_INT__o_s_q_s, PRIM_PTR_INT__o_s_q_s);
                        contract(8190, shelloffsets, PRIM_INT__o_s_r_s, PRIM_PTR_INT__o_s_r_s);
                        contract(3276, shelloffsets, PRIM_INT__q_s_k_s, PRIM_PTR_INT__q_s_k_s);
                        contract(4095, shelloffsets, PRIM_INT__q_s_l_s, PRIM_PTR_INT__q_s_l_s);
                        contract(5005, shelloffsets, PRIM_INT__q_s_m_s, PRIM_PTR_INT__q_s_m_s);
                        contract(6006, shelloffsets, PRIM_INT__q_s_n_s, PRIM_PTR_INT__q_s_n_s);
                        contract(7098, shelloffsets, PRIM_INT__q_s_o_s, PRIM_PTR_INT__q_s_o_s);
                        contract(8281, shelloffsets, PRIM_INT__q_s_q_s, PRIM_PTR_INT__q_s_q_s);
                        contract(9555, shelloffsets, PRIM_INT__q_s_r_s, PRIM_PTR_INT__q_s_r_s);
                        PRIM_PTR_INT__i_s_k_s += lastoffset*1008;
                        PRIM_PTR_INT__i_s_l_s += lastoffset*1260;
                        PRIM_PTR_INT__i_s_m_s += lastoffset*1540;
                        PRIM_PTR_INT__i_s_n_s += lastoffset*1848;
                        PRIM_PTR_INT__i_s_o_s += lastoffset*2184;
                        PRIM_PTR_INT__i_s_q_s += lastoffset*2548;
                        PRIM_PTR_INT__i_s_r_s += lastoffset*2940;
                        PRIM_PTR_INT__k_s_k_s += lastoffset*1296;
                        PRIM_PTR_INT__k_s_l_s += lastoffset*1620;
                        PRIM_PTR_INT__k_s_m_s += lastoffset*1980;
                        PRIM_PTR_INT__k_s_n_s += lastoffset*2376;
                        PRIM_PTR_INT__k_s_o_s += lastoffset*2808;
                        PRIM_PTR_INT__k_s_q_s += lastoffset*3276;
                        PRIM_PTR_INT__k_s_r_s += lastoffset*3780;
                        PRIM_PTR_INT__l_s_k_s += lastoffset*1620;
                        PRIM_PTR_INT__l_s_l_s += lastoffset*2025;
                        PRIM_PTR_INT__l_s_m_s += lastoffset*2475;
                        PRIM_PTR_INT__l_s_n_s += lastoffset*2970;
                        PRIM_PTR_INT__l_s_o_s += lastoffset*3510;
                        PRIM_PTR_INT__l_s_q_s += lastoffset*4095;
                        PRIM_PTR_INT__l_s_r_s += lastoffset*4725;
                        PRIM_PTR_INT__m_s_k_s += lastoffset*1980;
                        PRIM_PTR_INT__m_s_l_s += lastoffset*2475;
                        PRIM_PTR_INT__m_s_m_s += lastoffset*3025;
                        PRIM_PTR_INT__m_s_n_s += lastoffset*3630;
                        PRIM_PTR_INT__m_s_o_s += lastoffset*4290;
                        PRIM_PTR_INT__m_s_q_s += lastoffset*5005;
                        PRIM_PTR_INT__m_s_r_s += lastoffset*5775;
                        PRIM_PTR_INT__n_s_k_s += lastoffset*2376;
                        PRIM_PTR_INT__n_s_l_s += lastoffset*2970;
                        PRIM_PTR_INT__n_s_m_s += lastoffset*3630;
                        PRIM_PTR_INT__n_s_n_s += lastoffset*4356;
                        PRIM_PTR_INT__n_s_o_s += lastoffset*5148;
                        PRIM_PTR_INT__n_s_q_s += lastoffset*6006;
                        PRIM_PTR_INT__n_s_r_s += lastoffset*6930;
                        PRIM_PTR_INT__o_s_k_s += lastoffset*2808;
                        PRIM_PTR_INT__o_s_l_s += lastoffset*3510;
                        PRIM_PTR_INT__o_s_m_s += lastoffset*4290;
                        PRIM_PTR_INT__o_s_n_s += lastoffset*5148;
                        PRIM_PTR_INT__o_s_o_s += lastoffset*6084;
                        PRIM_PTR_INT__o_s_q_s += lastoffset*7098;
                        PRIM_PTR_INT__o_s_r_s += lastoffset*8190;
                        PRIM_PTR_INT__q_s_k_s += lastoffset*3276;
                        PRIM_PTR_INT__q_s_l_s += lastoffset*4095;
                        PRIM_PTR_INT__q_s_m_s += lastoffset*5005;
                        PRIM_PTR_INT__q_s_n_s += lastoffset*6006;
                        PRIM_PTR_INT__q_s_o_s += lastoffset*7098;
                        PRIM_PTR_INT__q_s_q_s += lastoffset*8281;
                        PRIM_PTR_INT__q_s_r_s += lastoffset*9555;
                    }

                }  // close loop over j
            }  // close loop over i
            
            //Advance to the next batch
            jstart = SIMINT_SIMD_ROUND(jend);
            
            //////////////////////////////////////////////
            // Contracted integrals: Horizontal recurrance
            //////////////////////////////////////////////


            const double hAB[3] = { P.AB_x[ab], P.AB_y[ab], P.AB_z[ab] };


            for(abcd = 0; abcd < nshellbatch; ++abcd, ++real_abcd)
            {
                const double hCD[3] = { Q.AB_x[cd+abcd], Q.AB_y[cd+abcd], Q.AB_z[cd+abcd] };

                // set up HRR pointers
                double const * restrict HRR_INT__i_s_k_s = INT__i_s_k_s + abcd * 1008;
                double const * restrict HRR_INT__i_s_l_s = INT__i_s_l_s + abcd * 1260;
                double const * restrict HRR_INT__i_s_m_s = INT__i_s_m_s + abcd * 1540;
                double const * restrict HRR_INT__i_s_n_s = INT__i_s_n_s + abcd * 1848;
                double const * restrict HRR_INT__i_s_o_s = INT__i_s_o_s + abcd * 2184;
                double const * restrict HRR_INT__i_s_q_s = INT__i_s_q_s + abcd * 2548;
                double const * restrict HRR_INT__i_s_r_s = INT__i_s_r_s + abcd * 2940;
                double const * restrict HRR_INT__k_s_k_s = INT__k_s_k_s + abcd * 1296;
                double const * restrict HRR_INT__k_s_l_s = INT__k_s_l_s + abcd * 1620;
                double const * restrict HRR_INT__k_s_m_s = INT__k_s_m_s + abcd * 1980;
                double const * restrict HRR_INT__k_s_n_s = INT__k_s_n_s + abcd * 2376;
                double const * restrict HRR_INT__k_s_o_s = INT__k_s_o_s + abcd * 2808;
                double const * restrict HRR_INT__k_s_q_s = INT__k_s_q_s + abcd * 3276;
                double const * restrict HRR_INT__k_s_r_s = INT__k_s_r_s + abcd * 3780;
                double const * restrict HRR_INT__l_s_k_s = INT__l_s_k_s + abcd * 1620;
                double const * restrict HRR_INT__l_s_l_s = INT__l_s_l_s + abcd * 2025;
                double const * restrict HRR_INT__l_s_m_s = INT__l_s_m_s + abcd * 2475;
                double const * restrict HRR_INT__l_s_n_s = INT__l_s_n_s + abcd * 2970;
                double const * restrict HRR_INT__l_s_o_s = INT__l_s_o_s + abcd * 3510;
                double const * restrict HRR_INT__l_s_q_s = INT__l_s_q_s + abcd * 4095;
                double const * restrict HRR_INT__l_s_r_s = INT__l_s_r_s + abcd * 4725;
                double const * restrict HRR_INT__m_s_k_s = INT__m_s_k_s + abcd * 1980;
                double const * restrict HRR_INT__m_s_l_s = INT__m_s_l_s + abcd * 2475;
                double const * restrict HRR_INT__m_s_m_s = INT__m_s_m_s + abcd * 3025;
                double const * restrict HRR_INT__m_s_n_s = INT__m_s_n_s + abcd * 3630;
                double const * restrict HRR_INT__m_s_o_s = INT__m_s_o_s + abcd * 4290;
                double const * restrict HRR_INT__m_s_q_s = INT__m_s_q_s + abcd * 5005;
                double const * restrict HRR_INT__m_s_r_s = INT__m_s_r_s + abcd * 5775;
                double const * restrict HRR_INT__n_s_k_s = INT__n_s_k_s + abcd * 2376;
                double const * restrict HRR_INT__n_s_l_s = INT__n_s_l_s + abcd * 2970;
                double const * restrict HRR_INT__n_s_m_s = INT__n_s_m_s + abcd * 3630;
                double const * restrict HRR_INT__n_s_n_s = INT__n_s_n_s + abcd * 4356;
                double const * restrict HRR_INT__n_s_o_s = INT__n_s_o_s + abcd * 5148;
                double const * restrict HRR_INT__n_s_q_s = INT__n_s_q_s + abcd * 6006;
                double const * restrict HRR_INT__n_s_r_s = INT__n_s_r_s + abcd * 6930;
                double const * restrict HRR_INT__o_s_k_s = INT__o_s_k_s + abcd * 2808;
                double const * restrict HRR_INT__o_s_l_s = INT__o_s_l_s + abcd * 3510;
                double const * restrict HRR_INT__o_s_m_s = INT__o_s_m_s + abcd * 4290;
                double const * restrict HRR_INT__o_s_n_s = INT__o_s_n_s + abcd * 5148;
                double const * restrict HRR_INT__o_s_o_s = INT__o_s_o_s + abcd * 6084;
                double const * restrict HRR_INT__o_s_q_s = INT__o_s_q_s + abcd * 7098;
                double const * restrict HRR_INT__o_s_r_s = INT__o_s_r_s + abcd * 8190;
                double const * restrict HRR_INT__q_s_k_s = INT__q_s_k_s + abcd * 3276;
                double const * restrict HRR_INT__q_s_l_s = INT__q_s_l_s + abcd * 4095;
                double const * restrict HRR_INT__q_s_m_s = INT__q_s_m_s + abcd * 5005;
                double const * restrict HRR_INT__q_s_n_s = INT__q_s_n_s + abcd * 6006;
                double const * restrict HRR_INT__q_s_o_s = INT__q_s_o_s + abcd * 7098;
                double const * restrict HRR_INT__q_s_q_s = INT__q_s_q_s + abcd * 8281;
                double const * restrict HRR_INT__q_s_r_s = INT__q_s_r_s + abcd * 9555;
                double * restrict HRR_INT__i_i_k_i = INT__i_i_k_i + real_abcd * 790272;

                // form INT__i_p_k_s
                ostei_general_hrr_J(6, 1, 7, 0, hAB, HRR_INT__k_s_k_s, HRR_INT__i_s_k_s, HRR_INT__i_p_k_s);

                // form INT__i_p_l_s
                ostei_general_hrr_J(6, 1, 8, 0, hAB, HRR_INT__k_s_l_s, HRR_INT__i_s_l_s, HRR_INT__i_p_l_s);

                // form INT__i_p_m_s
                ostei_general_hrr_J(6, 1, 9, 0, hAB, HRR_INT__k_s_m_s, HRR_INT__i_s_m_s, HRR_INT__i_p_m_s);

                // form INT__i_p_n_s
                ostei_general_hrr_J(6, 1, 10, 0, hAB, HRR_INT__k_s_n_s, HRR_INT__i_s_n_s, HRR_INT__i_p_n_s);

                // form INT__i_p_o_s
                ostei_general_hrr_J(6, 1, 11, 0, hAB, HRR_INT__k_s_o_s, HRR_INT__i_s_o_s, HRR_INT__i_p_o_s);

                // form INT__i_p_q_s
                ostei_general_hrr_J(6, 1, 12, 0, hAB, HRR_INT__k_s_q_s, HRR_INT__i_s_q_s, HRR_INT__i_p_q_s);

                // form INT__i_p_r_s
                ostei_general_hrr_J(6, 1, 13, 0, hAB, HRR_INT__k_s_r_s, HRR_INT__i_s_r_s, HRR_INT__i_p_r_s);

                // form INT__k_p_k_s
                ostei_general_hrr_J(7, 1, 7, 0, hAB, HRR_INT__l_s_k_s, HRR_INT__k_s_k_s, HRR_INT__k_p_k_s);

                // form INT__k_p_l_s
                ostei_general_hrr_J(7, 1, 8, 0, hAB, HRR_INT__l_s_l_s, HRR_INT__k_s_l_s, HRR_INT__k_p_l_s);

                // form INT__k_p_m_s
                ostei_general_hrr_J(7, 1, 9, 0, hAB, HRR_INT__l_s_m_s, HRR_INT__k_s_m_s, HRR_INT__k_p_m_s);

                // form INT__k_p_n_s
                ostei_general_hrr_J(7, 1, 10, 0, hAB, HRR_INT__l_s_n_s, HRR_INT__k_s_n_s, HRR_INT__k_p_n_s);

                // form INT__k_p_o_s
                ostei_general_hrr_J(7, 1, 11, 0, hAB, HRR_INT__l_s_o_s, HRR_INT__k_s_o_s, HRR_INT__k_p_o_s);

                // form INT__k_p_q_s
                ostei_general_hrr_J(7, 1, 12, 0, hAB, HRR_INT__l_s_q_s, HRR_INT__k_s_q_s, HRR_INT__k_p_q_s);

                // form INT__k_p_r_s
                ostei_general_hrr_J(7, 1, 13, 0, hAB, HRR_INT__l_s_r_s, HRR_INT__k_s_r_s, HRR_INT__k_p_r_s);

                // form INT__l_p_k_s
                ostei_general_hrr_J(8, 1, 7, 0, hAB, HRR_INT__m_s_k_s, HRR_INT__l_s_k_s, HRR_INT__l_p_k_s);

                // form INT__l_p_l_s
                ostei_general_hrr_J(8, 1, 8, 0, hAB, HRR_INT__m_s_l_s, HRR_INT__l_s_l_s, HRR_INT__l_p_l_s);

                // form INT__l_p_m_s
                ostei_general_hrr_J(8, 1, 9, 0, hAB, HRR_INT__m_s_m_s, HRR_INT__l_s_m_s, HRR_INT__l_p_m_s);

                // form INT__l_p_n_s
                ostei_general_hrr_J(8, 1, 10, 0, hAB, HRR_INT__m_s_n_s, HRR_INT__l_s_n_s, HRR_INT__l_p_n_s);

                // form INT__l_p_o_s
                ostei_general_hrr_J(8, 1, 11, 0, hAB, HRR_INT__m_s_o_s, HRR_INT__l_s_o_s, HRR_INT__l_p_o_s);

                // form INT__l_p_q_s
                ostei_general_hrr_J(8, 1, 12, 0, hAB, HRR_INT__m_s_q_s, HRR_INT__l_s_q_s, HRR_INT__l_p_q_s);

                // form INT__l_p_r_s
                ostei_general_hrr_J(8, 1, 13, 0, hAB, HRR_INT__m_s_r_s, HRR_INT__l_s_r_s, HRR_INT__l_p_r_s);

                // form INT__m_p_k_s
                ostei_general_hrr_J(9, 1, 7, 0, hAB, HRR_INT__n_s_k_s, HRR_INT__m_s_k_s, HRR_INT__m_p_k_s);

                // form INT__m_p_l_s
                ostei_general_hrr_J(9, 1, 8, 0, hAB, HRR_INT__n_s_l_s, HRR_INT__m_s_l_s, HRR_INT__m_p_l_s);

                // form INT__m_p_m_s
                ostei_general_hrr_J(9, 1, 9, 0, hAB, HRR_INT__n_s_m_s, HRR_INT__m_s_m_s, HRR_INT__m_p_m_s);

                // form INT__m_p_n_s
                ostei_general_hrr_J(9, 1, 10, 0, hAB, HRR_INT__n_s_n_s, HRR_INT__m_s_n_s, HRR_INT__m_p_n_s);

                // form INT__m_p_o_s
                ostei_general_hrr_J(9, 1, 11, 0, hAB, HRR_INT__n_s_o_s, HRR_INT__m_s_o_s, HRR_INT__m_p_o_s);

                // form INT__m_p_q_s
                ostei_general_hrr_J(9, 1, 12, 0, hAB, HRR_INT__n_s_q_s, HRR_INT__m_s_q_s, HRR_INT__m_p_q_s);

                // form INT__m_p_r_s
                ostei_general_hrr_J(9, 1, 13, 0, hAB, HRR_INT__n_s_r_s, HRR_INT__m_s_r_s, HRR_INT__m_p_r_s);

                // form INT__n_p_k_s
                ostei_general_hrr_J(10, 1, 7, 0, hAB, HRR_INT__o_s_k_s, HRR_INT__n_s_k_s, HRR_INT__n_p_k_s);

                // form INT__n_p_l_s
                ostei_general_hrr_J(10, 1, 8, 0, hAB, HRR_INT__o_s_l_s, HRR_INT__n_s_l_s, HRR_INT__n_p_l_s);

                // form INT__n_p_m_s
                ostei_general_hrr_J(10, 1, 9, 0, hAB, HRR_INT__o_s_m_s, HRR_INT__n_s_m_s, HRR_INT__n_p_m_s);

                // form INT__n_p_n_s
                ostei_general_hrr_J(10, 1, 10, 0, hAB, HRR_INT__o_s_n_s, HRR_INT__n_s_n_s, HRR_INT__n_p_n_s);

                // form INT__n_p_o_s
                ostei_general_hrr_J(10, 1, 11, 0, hAB, HRR_INT__o_s_o_s, HRR_INT__n_s_o_s, HRR_INT__n_p_o_s);

                // form INT__n_p_q_s
                ostei_general_hrr_J(10, 1, 12, 0, hAB, HRR_INT__o_s_q_s, HRR_INT__n_s_q_s, HRR_INT__n_p_q_s);

                // form INT__n_p_r_s
                ostei_general_hrr_J(10, 1, 13, 0, hAB, HRR_INT__o_s_r_s, HRR_INT__n_s_r_s, HRR_INT__n_p_r_s);

                // form INT__o_p_k_s
                ostei_general_hrr_J(11, 1, 7, 0, hAB, HRR_INT__q_s_k_s, HRR_INT__o_s_k_s, HRR_INT__o_p_k_s);

                // form INT__o_p_l_s
                ostei_general_hrr_J(11, 1, 8, 0, hAB, HRR_INT__q_s_l_s, HRR_INT__o_s_l_s, HRR_INT__o_p_l_s);

                // form INT__o_p_m_s
                ostei_general_hrr_J(11, 1, 9, 0, hAB, HRR_INT__q_s_m_s, HRR_INT__o_s_m_s, HRR_INT__o_p_m_s);

                // form INT__o_p_n_s
                ostei_general_hrr_J(11, 1, 10, 0, hAB, HRR_INT__q_s_n_s, HRR_INT__o_s_n_s, HRR_INT__o_p_n_s);

                // form INT__o_p_o_s
                ostei_general_hrr_J(11, 1, 11, 0, hAB, HRR_INT__q_s_o_s, HRR_INT__o_s_o_s, HRR_INT__o_p_o_s);

                // form INT__o_p_q_s
                ostei_general_hrr_J(11, 1, 12, 0, hAB, HRR_INT__q_s_q_s, HRR_INT__o_s_q_s, HRR_INT__o_p_q_s);

                // form INT__o_p_r_s
                ostei_general_hrr_J(11, 1, 13, 0, hAB, HRR_INT__q_s_r_s, HRR_INT__o_s_r_s, HRR_INT__o_p_r_s);

                // form INT__i_d_k_s
                ostei_general_hrr_J(6, 2, 7, 0, hAB, HRR_INT__k_p_k_s, HRR_INT__i_p_k_s, HRR_INT__i_d_k_s);

                // form INT__i_d_l_s
                ostei_general_hrr_J(6, 2, 8, 0, hAB, HRR_INT__k_p_l_s, HRR_INT__i_p_l_s, HRR_INT__i_d_l_s);

                // form INT__i_d_m_s
                ostei_general_hrr_J(6, 2, 9, 0, hAB, HRR_INT__k_p_m_s, HRR_INT__i_p_m_s, HRR_INT__i_d_m_s);

                // form INT__i_d_n_s
                ostei_general_hrr_J(6, 2, 10, 0, hAB, HRR_INT__k_p_n_s, HRR_INT__i_p_n_s, HRR_INT__i_d_n_s);

                // form INT__i_d_o_s
                ostei_general_hrr_J(6, 2, 11, 0, hAB, HRR_INT__k_p_o_s, HRR_INT__i_p_o_s, HRR_INT__i_d_o_s);

                // form INT__i_d_q_s
                ostei_general_hrr_J(6, 2, 12, 0, hAB, HRR_INT__k_p_q_s, HRR_INT__i_p_q_s, HRR_INT__i_d_q_s);

                // form INT__i_d_r_s
                ostei_general_hrr_J(6, 2, 13, 0, hAB, HRR_INT__k_p_r_s, HRR_INT__i_p_r_s, HRR_INT__i_d_r_s);

                // form INT__k_d_k_s
                ostei_general_hrr_J(7, 2, 7, 0, hAB, HRR_INT__l_p_k_s, HRR_INT__k_p_k_s, HRR_INT__k_d_k_s);

                // form INT__k_d_l_s
                ostei_general_hrr_J(7, 2, 8, 0, hAB, HRR_INT__l_p_l_s, HRR_INT__k_p_l_s, HRR_INT__k_d_l_s);

                // form INT__k_d_m_s
                ostei_general_hrr_J(7, 2, 9, 0, hAB, HRR_INT__l_p_m_s, HRR_INT__k_p_m_s, HRR_INT__k_d_m_s);

                // form INT__k_d_n_s
                ostei_general_hrr_J(7, 2, 10, 0, hAB, HRR_INT__l_p_n_s, HRR_INT__k_p_n_s, HRR_INT__k_d_n_s);

                // form INT__k_d_o_s
                ostei_general_hrr_J(7, 2, 11, 0, hAB, HRR_INT__l_p_o_s, HRR_INT__k_p_o_s, HRR_INT__k_d_o_s);

                // form INT__k_d_q_s
                ostei_general_hrr_J(7, 2, 12, 0, hAB, HRR_INT__l_p_q_s, HRR_INT__k_p_q_s, HRR_INT__k_d_q_s);

                // form INT__k_d_r_s
                ostei_general_hrr_J(7, 2, 13, 0, hAB, HRR_INT__l_p_r_s, HRR_INT__k_p_r_s, HRR_INT__k_d_r_s);

                // form INT__l_d_k_s
                ostei_general_hrr_J(8, 2, 7, 0, hAB, HRR_INT__m_p_k_s, HRR_INT__l_p_k_s, HRR_INT__l_d_k_s);

                // form INT__l_d_l_s
                ostei_general_hrr_J(8, 2, 8, 0, hAB, HRR_INT__m_p_l_s, HRR_INT__l_p_l_s, HRR_INT__l_d_l_s);

                // form INT__l_d_m_s
                ostei_general_hrr_J(8, 2, 9, 0, hAB, HRR_INT__m_p_m_s, HRR_INT__l_p_m_s, HRR_INT__l_d_m_s);

                // form INT__l_d_n_s
                ostei_general_hrr_J(8, 2, 10, 0, hAB, HRR_INT__m_p_n_s, HRR_INT__l_p_n_s, HRR_INT__l_d_n_s);

                // form INT__l_d_o_s
                ostei_general_hrr_J(8, 2, 11, 0, hAB, HRR_INT__m_p_o_s, HRR_INT__l_p_o_s, HRR_INT__l_d_o_s);

                // form INT__l_d_q_s
                ostei_general_hrr_J(8, 2, 12, 0, hAB, HRR_INT__m_p_q_s, HRR_INT__l_p_q_s, HRR_INT__l_d_q_s);

                // form INT__l_d_r_s
                ostei_general_hrr_J(8, 2, 13, 0, hAB, HRR_INT__m_p_r_s, HRR_INT__l_p_r_s, HRR_INT__l_d_r_s);

                // form INT__m_d_k_s
                ostei_general_hrr_J(9, 2, 7, 0, hAB, HRR_INT__n_p_k_s, HRR_INT__m_p_k_s, HRR_INT__m_d_k_s);

                // form INT__m_d_l_s
                ostei_general_hrr_J(9, 2, 8, 0, hAB, HRR_INT__n_p_l_s, HRR_INT__m_p_l_s, HRR_INT__m_d_l_s);

                // form INT__m_d_m_s
                ostei_general_hrr_J(9, 2, 9, 0, hAB, HRR_INT__n_p_m_s, HRR_INT__m_p_m_s, HRR_INT__m_d_m_s);

                // form INT__m_d_n_s
                ostei_general_hrr_J(9, 2, 10, 0, hAB, HRR_INT__n_p_n_s, HRR_INT__m_p_n_s, HRR_INT__m_d_n_s);

                // form INT__m_d_o_s
                ostei_general_hrr_J(9, 2, 11, 0, hAB, HRR_INT__n_p_o_s, HRR_INT__m_p_o_s, HRR_INT__m_d_o_s);

                // form INT__m_d_q_s
                ostei_general_hrr_J(9, 2, 12, 0, hAB, HRR_INT__n_p_q_s, HRR_INT__m_p_q_s, HRR_INT__m_d_q_s);

                // form INT__m_d_r_s
                ostei_general_hrr_J(9, 2, 13, 0, hAB, HRR_INT__n_p_r_s, HRR_INT__m_p_r_s, HRR_INT__m_d_r_s);

                // form INT__n_d_k_s
                ostei_general_hrr_J(10, 2, 7, 0, hAB, HRR_INT__o_p_k_s, HRR_INT__n_p_k_s, HRR_INT__n_d_k_s);

                // form INT__n_d_l_s
                ostei_general_hrr_J(10, 2, 8, 0, hAB, HRR_INT__o_p_l_s, HRR_INT__n_p_l_s, HRR_INT__n_d_l_s);

                // form INT__n_d_m_s
                ostei_general_hrr_J(10, 2, 9, 0, hAB, HRR_INT__o_p_m_s, HRR_INT__n_p_m_s, HRR_INT__n_d_m_s);

                // form INT__n_d_n_s
                ostei_general_hrr_J(10, 2, 10, 0, hAB, HRR_INT__o_p_n_s, HRR_INT__n_p_n_s, HRR_INT__n_d_n_s);

                // form INT__n_d_o_s
                ostei_general_hrr_J(10, 2, 11, 0, hAB, HRR_INT__o_p_o_s, HRR_INT__n_p_o_s, HRR_INT__n_d_o_s);

                // form INT__n_d_q_s
                ostei_general_hrr_J(10, 2, 12, 0, hAB, HRR_INT__o_p_q_s, HRR_INT__n_p_q_s, HRR_INT__n_d_q_s);

                // form INT__n_d_r_s
                ostei_general_hrr_J(10, 2, 13, 0, hAB, HRR_INT__o_p_r_s, HRR_INT__n_p_r_s, HRR_INT__n_d_r_s);

                // form INT__i_f_k_s
                ostei_general_hrr_J(6, 3, 7, 0, hAB, HRR_INT__k_d_k_s, HRR_INT__i_d_k_s, HRR_INT__i_f_k_s);

                // form INT__i_f_l_s
                ostei_general_hrr_J(6, 3, 8, 0, hAB, HRR_INT__k_d_l_s, HRR_INT__i_d_l_s, HRR_INT__i_f_l_s);

                // form INT__i_f_m_s
                ostei_general_hrr_J(6, 3, 9, 0, hAB, HRR_INT__k_d_m_s, HRR_INT__i_d_m_s, HRR_INT__i_f_m_s);

                // form INT__i_f_n_s
                ostei_general_hrr_J(6, 3, 10, 0, hAB, HRR_INT__k_d_n_s, HRR_INT__i_d_n_s, HRR_INT__i_f_n_s);

                // form INT__i_f_o_s
                ostei_general_hrr_J(6, 3, 11, 0, hAB, HRR_INT__k_d_o_s, HRR_INT__i_d_o_s, HRR_INT__i_f_o_s);

                // form INT__i_f_q_s
                ostei_general_hrr_J(6, 3, 12, 0, hAB, HRR_INT__k_d_q_s, HRR_INT__i_d_q_s, HRR_INT__i_f_q_s);

                // form INT__i_f_r_s
                ostei_general_hrr_J(6, 3, 13, 0, hAB, HRR_INT__k_d_r_s, HRR_INT__i_d_r_s, HRR_INT__i_f_r_s);

                // form INT__k_f_k_s
                ostei_general_hrr_J(7, 3, 7, 0, hAB, HRR_INT__l_d_k_s, HRR_INT__k_d_k_s, HRR_INT__k_f_k_s);

                // form INT__k_f_l_s
                ostei_general_hrr_J(7, 3, 8, 0, hAB, HRR_INT__l_d_l_s, HRR_INT__k_d_l_s, HRR_INT__k_f_l_s);

                // form INT__k_f_m_s
                ostei_general_hrr_J(7, 3, 9, 0, hAB, HRR_INT__l_d_m_s, HRR_INT__k_d_m_s, HRR_INT__k_f_m_s);

                // form INT__k_f_n_s
                ostei_general_hrr_J(7, 3, 10, 0, hAB, HRR_INT__l_d_n_s, HRR_INT__k_d_n_s, HRR_INT__k_f_n_s);

                // form INT__k_f_o_s
                ostei_general_hrr_J(7, 3, 11, 0, hAB, HRR_INT__l_d_o_s, HRR_INT__k_d_o_s, HRR_INT__k_f_o_s);

                // form INT__k_f_q_s
                ostei_general_hrr_J(7, 3, 12, 0, hAB, HRR_INT__l_d_q_s, HRR_INT__k_d_q_s, HRR_INT__k_f_q_s);

                // form INT__k_f_r_s
                ostei_general_hrr_J(7, 3, 13, 0, hAB, HRR_INT__l_d_r_s, HRR_INT__k_d_r_s, HRR_INT__k_f_r_s);

                // form INT__l_f_k_s
                ostei_general_hrr_J(8, 3, 7, 0, hAB, HRR_INT__m_d_k_s, HRR_INT__l_d_k_s, HRR_INT__l_f_k_s);

                // form INT__l_f_l_s
                ostei_general_hrr_J(8, 3, 8, 0, hAB, HRR_INT__m_d_l_s, HRR_INT__l_d_l_s, HRR_INT__l_f_l_s);

                // form INT__l_f_m_s
                ostei_general_hrr_J(8, 3, 9, 0, hAB, HRR_INT__m_d_m_s, HRR_INT__l_d_m_s, HRR_INT__l_f_m_s);

                // form INT__l_f_n_s
                ostei_general_hrr_J(8, 3, 10, 0, hAB, HRR_INT__m_d_n_s, HRR_INT__l_d_n_s, HRR_INT__l_f_n_s);

                // form INT__l_f_o_s
                ostei_general_hrr_J(8, 3, 11, 0, hAB, HRR_INT__m_d_o_s, HRR_INT__l_d_o_s, HRR_INT__l_f_o_s);

                // form INT__l_f_q_s
                ostei_general_hrr_J(8, 3, 12, 0, hAB, HRR_INT__m_d_q_s, HRR_INT__l_d_q_s, HRR_INT__l_f_q_s);

                // form INT__l_f_r_s
                ostei_general_hrr_J(8, 3, 13, 0, hAB, HRR_INT__m_d_r_s, HRR_INT__l_d_r_s, HRR_INT__l_f_r_s);

                // form INT__m_f_k_s
                ostei_general_hrr_J(9, 3, 7, 0, hAB, HRR_INT__n_d_k_s, HRR_INT__m_d_k_s, HRR_INT__m_f_k_s);

                // form INT__m_f_l_s
                ostei_general_hrr_J(9, 3, 8, 0, hAB, HRR_INT__n_d_l_s, HRR_INT__m_d_l_s, HRR_INT__m_f_l_s);

                // form INT__m_f_m_s
                ostei_general_hrr_J(9, 3, 9, 0, hAB, HRR_INT__n_d_m_s, HRR_INT__m_d_m_s, HRR_INT__m_f_m_s);

                // form INT__m_f_n_s
                ostei_general_hrr_J(9, 3, 10, 0, hAB, HRR_INT__n_d_n_s, HRR_INT__m_d_n_s, HRR_INT__m_f_n_s);

                // form INT__m_f_o_s
                ostei_general_hrr_J(9, 3, 11, 0, hAB, HRR_INT__n_d_o_s, HRR_INT__m_d_o_s, HRR_INT__m_f_o_s);

                // form INT__m_f_q_s
                ostei_general_hrr_J(9, 3, 12, 0, hAB, HRR_INT__n_d_q_s, HRR_INT__m_d_q_s, HRR_INT__m_f_q_s);

                // form INT__m_f_r_s
                ostei_general_hrr_J(9, 3, 13, 0, hAB, HRR_INT__n_d_r_s, HRR_INT__m_d_r_s, HRR_INT__m_f_r_s);

                // form INT__i_g_k_s
                ostei_general_hrr_J(6, 4, 7, 0, hAB, HRR_INT__k_f_k_s, HRR_INT__i_f_k_s, HRR_INT__i_g_k_s);

                // form INT__i_g_l_s
                ostei_general_hrr_J(6, 4, 8, 0, hAB, HRR_INT__k_f_l_s, HRR_INT__i_f_l_s, HRR_INT__i_g_l_s);

                // form INT__i_g_m_s
                ostei_general_hrr_J(6, 4, 9, 0, hAB, HRR_INT__k_f_m_s, HRR_INT__i_f_m_s, HRR_INT__i_g_m_s);

                // form INT__i_g_n_s
                ostei_general_hrr_J(6, 4, 10, 0, hAB, HRR_INT__k_f_n_s, HRR_INT__i_f_n_s, HRR_INT__i_g_n_s);

                // form INT__i_g_o_s
                ostei_general_hrr_J(6, 4, 11, 0, hAB, HRR_INT__k_f_o_s, HRR_INT__i_f_o_s, HRR_INT__i_g_o_s);

                // form INT__i_g_q_s
                ostei_general_hrr_J(6, 4, 12, 0, hAB, HRR_INT__k_f_q_s, HRR_INT__i_f_q_s, HRR_INT__i_g_q_s);

                // form INT__i_g_r_s
                ostei_general_hrr_J(6, 4, 13, 0, hAB, HRR_INT__k_f_r_s, HRR_INT__i_f_r_s, HRR_INT__i_g_r_s);

                // form INT__k_g_k_s
                ostei_general_hrr_J(7, 4, 7, 0, hAB, HRR_INT__l_f_k_s, HRR_INT__k_f_k_s, HRR_INT__k_g_k_s);

                // form INT__k_g_l_s
                ostei_general_hrr_J(7, 4, 8, 0, hAB, HRR_INT__l_f_l_s, HRR_INT__k_f_l_s, HRR_INT__k_g_l_s);

                // form INT__k_g_m_s
                ostei_general_hrr_J(7, 4, 9, 0, hAB, HRR_INT__l_f_m_s, HRR_INT__k_f_m_s, HRR_INT__k_g_m_s);

                // form INT__k_g_n_s
                ostei_general_hrr_J(7, 4, 10, 0, hAB, HRR_INT__l_f_n_s, HRR_INT__k_f_n_s, HRR_INT__k_g_n_s);

                // form INT__k_g_o_s
                ostei_general_hrr_J(7, 4, 11, 0, hAB, HRR_INT__l_f_o_s, HRR_INT__k_f_o_s, HRR_INT__k_g_o_s);

                // form INT__k_g_q_s
                ostei_general_hrr_J(7, 4, 12, 0, hAB, HRR_INT__l_f_q_s, HRR_INT__k_f_q_s, HRR_INT__k_g_q_s);

                // form INT__k_g_r_s
                ostei_general_hrr_J(7, 4, 13, 0, hAB, HRR_INT__l_f_r_s, HRR_INT__k_f_r_s, HRR_INT__k_g_r_s);

                // form INT__l_g_k_s
                ostei_general_hrr_J(8, 4, 7, 0, hAB, HRR_INT__m_f_k_s, HRR_INT__l_f_k_s, HRR_INT__l_g_k_s);

                // form INT__l_g_l_s
                ostei_general_hrr_J(8, 4, 8, 0, hAB, HRR_INT__m_f_l_s, HRR_INT__l_f_l_s, HRR_INT__l_g_l_s);

                // form INT__l_g_m_s
                ostei_general_hrr_J(8, 4, 9, 0, hAB, HRR_INT__m_f_m_s, HRR_INT__l_f_m_s, HRR_INT__l_g_m_s);

                // form INT__l_g_n_s
                ostei_general_hrr_J(8, 4, 10, 0, hAB, HRR_INT__m_f_n_s, HRR_INT__l_f_n_s, HRR_INT__l_g_n_s);

                // form INT__l_g_o_s
                ostei_general_hrr_J(8, 4, 11, 0, hAB, HRR_INT__m_f_o_s, HRR_INT__l_f_o_s, HRR_INT__l_g_o_s);

                // form INT__l_g_q_s
                ostei_general_hrr_J(8, 4, 12, 0, hAB, HRR_INT__m_f_q_s, HRR_INT__l_f_q_s, HRR_INT__l_g_q_s);

                // form INT__l_g_r_s
                ostei_general_hrr_J(8, 4, 13, 0, hAB, HRR_INT__m_f_r_s, HRR_INT__l_f_r_s, HRR_INT__l_g_r_s);

                // form INT__i_h_k_s
                ostei_general_hrr_J(6, 5, 7, 0, hAB, HRR_INT__k_g_k_s, HRR_INT__i_g_k_s, HRR_INT__i_h_k_s);

                // form INT__i_h_l_s
                ostei_general_hrr_J(6, 5, 8, 0, hAB, HRR_INT__k_g_l_s, HRR_INT__i_g_l_s, HRR_INT__i_h_l_s);

                // form INT__i_h_m_s
                ostei_general_hrr_J(6, 5, 9, 0, hAB, HRR_INT__k_g_m_s, HRR_INT__i_g_m_s, HRR_INT__i_h_m_s);

                // form INT__i_h_n_s
                ostei_general_hrr_J(6, 5, 10, 0, hAB, HRR_INT__k_g_n_s, HRR_INT__i_g_n_s, HRR_INT__i_h_n_s);

                // form INT__i_h_o_s
                ostei_general_hrr_J(6, 5, 11, 0, hAB, HRR_INT__k_g_o_s, HRR_INT__i_g_o_s, HRR_INT__i_h_o_s);

                // form INT__i_h_q_s
                ostei_general_hrr_J(6, 5, 12, 0, hAB, HRR_INT__k_g_q_s, HRR_INT__i_g_q_s, HRR_INT__i_h_q_s);

                // form INT__i_h_r_s
                ostei_general_hrr_J(6, 5, 13, 0, hAB, HRR_INT__k_g_r_s, HRR_INT__i_g_r_s, HRR_INT__i_h_r_s);

                // form INT__k_h_k_s
                ostei_general_hrr_J(7, 5, 7, 0, hAB, HRR_INT__l_g_k_s, HRR_INT__k_g_k_s, HRR_INT__k_h_k_s);

                // form INT__k_h_l_s
                ostei_general_hrr_J(7, 5, 8, 0, hAB, HRR_INT__l_g_l_s, HRR_INT__k_g_l_s, HRR_INT__k_h_l_s);

                // form INT__k_h_m_s
                ostei_general_hrr_J(7, 5, 9, 0, hAB, HRR_INT__l_g_m_s, HRR_INT__k_g_m_s, HRR_INT__k_h_m_s);

                // form INT__k_h_n_s
                ostei_general_hrr_J(7, 5, 10, 0, hAB, HRR_INT__l_g_n_s, HRR_INT__k_g_n_s, HRR_INT__k_h_n_s);

                // form INT__k_h_o_s
                ostei_general_hrr_J(7, 5, 11, 0, hAB, HRR_INT__l_g_o_s, HRR_INT__k_g_o_s, HRR_INT__k_h_o_s);

                // form INT__k_h_q_s
                ostei_general_hrr_J(7, 5, 12, 0, hAB, HRR_INT__l_g_q_s, HRR_INT__k_g_q_s, HRR_INT__k_h_q_s);

                // form INT__k_h_r_s
                ostei_general_hrr_J(7, 5, 13, 0, hAB, HRR_INT__l_g_r_s, HRR_INT__k_g_r_s, HRR_INT__k_h_r_s);

                // form INT__i_i_k_s
                ostei_general_hrr_J(6, 6, 7, 0, hAB, HRR_INT__k_h_k_s, HRR_INT__i_h_k_s, HRR_INT__i_i_k_s);

                // form INT__i_i_l_s
                ostei_general_hrr_J(6, 6, 8, 0, hAB, HRR_INT__k_h_l_s, HRR_INT__i_h_l_s, HRR_INT__i_i_l_s);

                // form INT__i_i_m_s
                ostei_general_hrr_J(6, 6, 9, 0, hAB, HRR_INT__k_h_m_s, HRR_INT__i_h_m_s, HRR_INT__i_i_m_s);

                // form INT__i_i_n_s
                ostei_general_hrr_J(6, 6, 10, 0, hAB, HRR_INT__k_h_n_s, HRR_INT__i_h_n_s, HRR_INT__i_i_n_s);

                // form INT__i_i_o_s
                ostei_general_hrr_J(6, 6, 11, 0, hAB, HRR_INT__k_h_o_s, HRR_INT__i_h_o_s, HRR_INT__i_i_o_s);

                // form INT__i_i_q_s
                ostei_general_hrr_J(6, 6, 12, 0, hAB, HRR_INT__k_h_q_s, HRR_INT__i_h_q_s, HRR_INT__i_i_q_s);

                // form INT__i_i_r_s
                ostei_general_hrr_J(6, 6, 13, 0, hAB, HRR_INT__k_h_r_s, HRR_INT__i_h_r_s, HRR_INT__i_i_r_s);

                // form INT__i_i_k_p
                ostei_general_hrr_L(6, 6, 7, 1, hCD, HRR_INT__i_i_l_s, HRR_INT__i_i_k_s, HRR_INT__i_i_k_p);

                // form INT__i_i_l_p
                ostei_general_hrr_L(6, 6, 8, 1, hCD, HRR_INT__i_i_m_s, HRR_INT__i_i_l_s, HRR_INT__i_i_l_p);

                // form INT__i_i_m_p
                ostei_general_hrr_L(6, 6, 9, 1, hCD, HRR_INT__i_i_n_s, HRR_INT__i_i_m_s, HRR_INT__i_i_m_p);

                // form INT__i_i_n_p
                ostei_general_hrr_L(6, 6, 10, 1, hCD, HRR_INT__i_i_o_s, HRR_INT__i_i_n_s, HRR_INT__i_i_n_p);

                // form INT__i_i_o_p
                ostei_general_hrr_L(6, 6, 11, 1, hCD, HRR_INT__i_i_q_s, HRR_INT__i_i_o_s, HRR_INT__i_i_o_p);

                // form INT__i_i_q_p
                ostei_general_hrr_L(6, 6, 12, 1, hCD, HRR_INT__i_i_r_s, HRR_INT__i_i_q_s, HRR_INT__i_i_q_p);

                // form INT__i_i_k_d
                ostei_general_hrr_L(6, 6, 7, 2, hCD, HRR_INT__i_i_l_p, HRR_INT__i_i_k_p, HRR_INT__i_i_k_d);

                // form INT__i_i_l_d
                ostei_general_hrr_L(6, 6, 8, 2, hCD, HRR_INT__i_i_m_p, HRR_INT__i_i_l_p, HRR_INT__i_i_l_d);

                // form INT__i_i_m_d
                ostei_general_hrr_L(6, 6, 9, 2, hCD, HRR_INT__i_i_n_p, HRR_INT__i_i_m_p, HRR_INT__i_i_m_d);

                // form INT__i_i_n_d
                ostei_general_hrr_L(6, 6, 10, 2, hCD, HRR_INT__i_i_o_p, HRR_INT__i_i_n_p, HRR_INT__i_i_n_d);

                // form INT__i_i_o_d
                ostei_general_hrr_L(6, 6, 11, 2, hCD, HRR_INT__i_i_q_p, HRR_INT__i_i_o_p, HRR_INT__i_i_o_d);

                // form INT__i_i_k_f
                ostei_general_hrr_L(6, 6, 7, 3, hCD, HRR_INT__i_i_l_d, HRR_INT__i_i_k_d, HRR_INT__i_i_k_f);

                // form INT__i_i_l_f
                ostei_general_hrr_L(6, 6, 8, 3, hCD, HRR_INT__i_i_m_d, HRR_INT__i_i_l_d, HRR_INT__i_i_l_f);

                // form INT__i_i_m_f
                ostei_general_hrr_L(6, 6, 9, 3, hCD, HRR_INT__i_i_n_d, HRR_INT__i_i_m_d, HRR_INT__i_i_m_f);

                // form INT__i_i_n_f
                ostei_general_hrr_L(6, 6, 10, 3, hCD, HRR_INT__i_i_o_d, HRR_INT__i_i_n_d, HRR_INT__i_i_n_f);

                // form INT__i_i_k_g
                ostei_general_hrr_L(6, 6, 7, 4, hCD, HRR_INT__i_i_l_f, HRR_INT__i_i_k_f, HRR_INT__i_i_k_g);

                // form INT__i_i_l_g
                ostei_general_hrr_L(6, 6, 8, 4, hCD, HRR_INT__i_i_m_f, HRR_INT__i_i_l_f, HRR_INT__i_i_l_g);

                // form INT__i_i_m_g
                ostei_general_hrr_L(6, 6, 9, 4, hCD, HRR_INT__i_i_n_f, HRR_INT__i_i_m_f, HRR_INT__i_i_m_g);

                // form INT__i_i_k_h
                ostei_general_hrr_L(6, 6, 7, 5, hCD, HRR_INT__i_i_l_g, HRR_INT__i_i_k_g, HRR_INT__i_i_k_h);

                // form INT__i_i_l_h
                ostei_general_hrr_L(6, 6, 8, 5, hCD, HRR_INT__i_i_m_g, HRR_INT__i_i_l_g, HRR_INT__i_i_l_h);

                // form INT__i_i_k_i
                ostei_general_hrr_L(6, 6, 7, 6, hCD, HRR_INT__i_i_l_h, HRR_INT__i_i_k_h, HRR_INT__i_i_k_i);


            }  // close HRR loop


        }   // close loop cdbatch

        istart = iend;
    }  // close loop over ab

    return P.nshell12_clip * Q.nshell12_clip;
}

int ostei_i_i_i_k(struct simint_multi_shellpair const P,
                  struct simint_multi_shellpair const Q,
                  double screen_tol,
                  double * const restrict work,
                  double * const restrict INT__i_i_i_k)
{
    double Q_AB[3*Q.nshell12];
    struct simint_multi_shellpair Q_tmp = Q;
    Q_tmp.PA_x = Q.PB_x;  Q_tmp.PA_y = Q.PB_y;  Q_tmp.PA_z = Q.PB_z;
    Q_tmp.PB_x = Q.PA_x;  Q_tmp.PB_y = Q.PA_y;  Q_tmp.PB_z = Q.PA_z;
    Q_tmp.AB_x = Q_AB;
    Q_tmp.AB_y = Q_AB + Q.nshell12;
    Q_tmp.AB_z = Q_AB + 2*Q.nshell12;

    for(int i = 0; i < Q.nshell12; i++)
    {
        Q_tmp.AB_x[i] = -Q.AB_x[i];
        Q_tmp.AB_y[i] = -Q.AB_y[i];
        Q_tmp.AB_z[i] = -Q.AB_z[i];
    }

    int ret = ostei_i_i_k_i(P, Q_tmp, screen_tol, work, INT__i_i_i_k);
    double buffer[790272] SIMINT_ALIGN_ARRAY_DBL;

    for(int q = 0; q < ret; q++)
    {
        int idx = 0;
        for(int a = 0; a < 28; ++a)
        for(int b = 0; b < 28; ++b)
        for(int c = 0; c < 28; ++c)
        for(int d = 0; d < 36; ++d)
            buffer[idx++] = INT__i_i_i_k[q*790272+a*28224+b*1008+d*28+c];

        memcpy(INT__i_i_i_k+q*790272, buffer, 790272*sizeof(double));
    }

    return ret;
}

