#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_k_k_i_i(struct simint_multi_shellpair const P,
                  struct simint_multi_shellpair const Q,
                  double screen_tol,
                  double * const restrict work,
                  double * const restrict INT__k_k_i_i)
{

    SIMINT_ASSUME_ALIGN_DBL(work);
    SIMINT_ASSUME_ALIGN_DBL(INT__k_k_i_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__k_s_i_s = work + (SIMINT_NSHELL_SIMD * 0);
    double * const INT__k_s_k_s = work + (SIMINT_NSHELL_SIMD * 1008);
    double * const INT__k_s_l_s = work + (SIMINT_NSHELL_SIMD * 2304);
    double * const INT__k_s_m_s = work + (SIMINT_NSHELL_SIMD * 3924);
    double * const INT__k_s_n_s = work + (SIMINT_NSHELL_SIMD * 5904);
    double * const INT__k_s_o_s = work + (SIMINT_NSHELL_SIMD * 8280);
    double * const INT__k_s_q_s = work + (SIMINT_NSHELL_SIMD * 11088);
    double * const INT__l_s_i_s = work + (SIMINT_NSHELL_SIMD * 14364);
    double * const INT__l_s_k_s = work + (SIMINT_NSHELL_SIMD * 15624);
    double * const INT__l_s_l_s = work + (SIMINT_NSHELL_SIMD * 17244);
    double * const INT__l_s_m_s = work + (SIMINT_NSHELL_SIMD * 19269);
    double * const INT__l_s_n_s = work + (SIMINT_NSHELL_SIMD * 21744);
    double * const INT__l_s_o_s = work + (SIMINT_NSHELL_SIMD * 24714);
    double * const INT__l_s_q_s = work + (SIMINT_NSHELL_SIMD * 28224);
    double * const INT__m_s_i_s = work + (SIMINT_NSHELL_SIMD * 32319);
    double * const INT__m_s_k_s = work + (SIMINT_NSHELL_SIMD * 33859);
    double * const INT__m_s_l_s = work + (SIMINT_NSHELL_SIMD * 35839);
    double * const INT__m_s_m_s = work + (SIMINT_NSHELL_SIMD * 38314);
    double * const INT__m_s_n_s = work + (SIMINT_NSHELL_SIMD * 41339);
    double * const INT__m_s_o_s = work + (SIMINT_NSHELL_SIMD * 44969);
    double * const INT__m_s_q_s = work + (SIMINT_NSHELL_SIMD * 49259);
    double * const INT__n_s_i_s = work + (SIMINT_NSHELL_SIMD * 54264);
    double * const INT__n_s_k_s = work + (SIMINT_NSHELL_SIMD * 56112);
    double * const INT__n_s_l_s = work + (SIMINT_NSHELL_SIMD * 58488);
    double * const INT__n_s_m_s = work + (SIMINT_NSHELL_SIMD * 61458);
    double * const INT__n_s_n_s = work + (SIMINT_NSHELL_SIMD * 65088);
    double * const INT__n_s_o_s = work + (SIMINT_NSHELL_SIMD * 69444);
    double * const INT__n_s_q_s = work + (SIMINT_NSHELL_SIMD * 74592);
    double * const INT__o_s_i_s = work + (SIMINT_NSHELL_SIMD * 80598);
    double * const INT__o_s_k_s = work + (SIMINT_NSHELL_SIMD * 82782);
    double * const INT__o_s_l_s = work + (SIMINT_NSHELL_SIMD * 85590);
    double * const INT__o_s_m_s = work + (SIMINT_NSHELL_SIMD * 89100);
    double * const INT__o_s_n_s = work + (SIMINT_NSHELL_SIMD * 93390);
    double * const INT__o_s_o_s = work + (SIMINT_NSHELL_SIMD * 98538);
    double * const INT__o_s_q_s = work + (SIMINT_NSHELL_SIMD * 104622);
    double * const INT__q_s_i_s = work + (SIMINT_NSHELL_SIMD * 111720);
    double * const INT__q_s_k_s = work + (SIMINT_NSHELL_SIMD * 114268);
    double * const INT__q_s_l_s = work + (SIMINT_NSHELL_SIMD * 117544);
    double * const INT__q_s_m_s = work + (SIMINT_NSHELL_SIMD * 121639);
    double * const INT__q_s_n_s = work + (SIMINT_NSHELL_SIMD * 126644);
    double * const INT__q_s_o_s = work + (SIMINT_NSHELL_SIMD * 132650);
    double * const INT__q_s_q_s = work + (SIMINT_NSHELL_SIMD * 139748);
    double * const INT__r_s_i_s = work + (SIMINT_NSHELL_SIMD * 148029);
    double * const INT__r_s_k_s = work + (SIMINT_NSHELL_SIMD * 150969);
    double * const INT__r_s_l_s = work + (SIMINT_NSHELL_SIMD * 154749);
    double * const INT__r_s_m_s = work + (SIMINT_NSHELL_SIMD * 159474);
    double * const INT__r_s_n_s = work + (SIMINT_NSHELL_SIMD * 165249);
    double * const INT__r_s_o_s = work + (SIMINT_NSHELL_SIMD * 172179);
    double * const INT__r_s_q_s = work + (SIMINT_NSHELL_SIMD * 180369);
    double * const INT__t_s_i_s = work + (SIMINT_NSHELL_SIMD * 189924);
    double * const INT__t_s_k_s = work + (SIMINT_NSHELL_SIMD * 193284);
    double * const INT__t_s_l_s = work + (SIMINT_NSHELL_SIMD * 197604);
    double * const INT__t_s_m_s = work + (SIMINT_NSHELL_SIMD * 203004);
    double * const INT__t_s_n_s = work + (SIMINT_NSHELL_SIMD * 209604);
    double * const INT__t_s_o_s = work + (SIMINT_NSHELL_SIMD * 217524);
    double * const INT__t_s_q_s = work + (SIMINT_NSHELL_SIMD * 226884);
    SIMINT_DBLTYPE * const primwork = (SIMINT_DBLTYPE *)(work + SIMINT_NSHELL_SIMD*237804);
    SIMINT_DBLTYPE * const restrict PRIM_INT__s_s_s_s = primwork + 0;
    SIMINT_DBLTYPE * const restrict PRIM_INT__s_s_p_s = primwork + 27;
    SIMINT_DBLTYPE * const restrict PRIM_INT__s_s_d_s = primwork + 63;
    SIMINT_DBLTYPE * const restrict PRIM_INT__s_s_f_s = primwork + 129;
    SIMINT_DBLTYPE * const restrict PRIM_INT__s_s_g_s = primwork + 229;
    SIMINT_DBLTYPE * const restrict PRIM_INT__s_s_h_s = primwork + 364;
    SIMINT_DBLTYPE * const restrict PRIM_INT__p_s_s_s = primwork + 532;
    SIMINT_DBLTYPE * const restrict PRIM_INT__p_s_p_s = primwork + 610;
    SIMINT_DBLTYPE * const restrict PRIM_INT__p_s_d_s = primwork + 718;
    SIMINT_DBLTYPE * const restrict PRIM_INT__p_s_f_s = primwork + 916;
    SIMINT_DBLTYPE * const restrict PRIM_INT__p_s_g_s = primwork + 1216;
    SIMINT_DBLTYPE * const restrict PRIM_INT__p_s_h_s = primwork + 1621;
    SIMINT_DBLTYPE * const restrict PRIM_INT__p_s_i_s = primwork + 2125;
    SIMINT_DBLTYPE * const restrict PRIM_INT__d_s_s_s = primwork + 2713;
    SIMINT_DBLTYPE * const restrict PRIM_INT__d_s_p_s = primwork + 2863;
    SIMINT_DBLTYPE * const restrict PRIM_INT__d_s_d_s = primwork + 3079;
    SIMINT_DBLTYPE * const restrict PRIM_INT__d_s_f_s = primwork + 3475;
    SIMINT_DBLTYPE * const restrict PRIM_INT__d_s_g_s = primwork + 4075;
    SIMINT_DBLTYPE * const restrict PRIM_INT__d_s_h_s = primwork + 4885;
    SIMINT_DBLTYPE * const restrict PRIM_INT__d_s_i_s = primwork + 5893;
    SIMINT_DBLTYPE * const restrict PRIM_INT__d_s_k_s = primwork + 7069;
    SIMINT_DBLTYPE * const restrict PRIM_INT__f_s_s_s = primwork + 8365;
    SIMINT_DBLTYPE * const restrict PRIM_INT__f_s_p_s = primwork + 8605;
    SIMINT_DBLTYPE * const restrict PRIM_INT__f_s_d_s = primwork + 8965;
    SIMINT_DBLTYPE * const restrict PRIM_INT__f_s_f_s = primwork + 9625;
    SIMINT_DBLTYPE * const restrict PRIM_INT__f_s_g_s = primwork + 10625;
    SIMINT_DBLTYPE * const restrict PRIM_INT__f_s_h_s = primwork + 11975;
    SIMINT_DBLTYPE * const restrict PRIM_INT__f_s_i_s = primwork + 13655;
    SIMINT_DBLTYPE * const restrict PRIM_INT__f_s_k_s = primwork + 15615;
    SIMINT_DBLTYPE * const restrict PRIM_INT__f_s_l_s = primwork + 17775;
    SIMINT_DBLTYPE * const restrict PRIM_INT__g_s_s_s = primwork + 20025;
    SIMINT_DBLTYPE * const restrict PRIM_INT__g_s_p_s = primwork + 20370;
    SIMINT_DBLTYPE * const restrict PRIM_INT__g_s_d_s = primwork + 20910;
    SIMINT_DBLTYPE * const restrict PRIM_INT__g_s_f_s = primwork + 21900;
    SIMINT_DBLTYPE * const restrict PRIM_INT__g_s_g_s = primwork + 23400;
    SIMINT_DBLTYPE * const restrict PRIM_INT__g_s_h_s = primwork + 25425;
    SIMINT_DBLTYPE * const restrict PRIM_INT__g_s_i_s = primwork + 27945;
    SIMINT_DBLTYPE * const restrict PRIM_INT__g_s_k_s = primwork + 30885;
    SIMINT_DBLTYPE * const restrict PRIM_INT__g_s_l_s = primwork + 34125;
    SIMINT_DBLTYPE * const restrict PRIM_INT__g_s_m_s = primwork + 37500;
    SIMINT_DBLTYPE * const restrict PRIM_INT__h_s_s_s = primwork + 40800;
    SIMINT_DBLTYPE * const restrict PRIM_INT__h_s_p_s = primwork + 41262;
    SIMINT_DBLTYPE * const restrict PRIM_INT__h_s_d_s = primwork + 42018;
    SIMINT_DBLTYPE * const restrict PRIM_INT__h_s_f_s = primwork + 43404;
    SIMINT_DBLTYPE * const restrict PRIM_INT__h_s_g_s = primwork + 45504;
    SIMINT_DBLTYPE * const restrict PRIM_INT__h_s_h_s = primwork + 48339;
    SIMINT_DBLTYPE * const restrict PRIM_INT__h_s_i_s = primwork + 51867;
    SIMINT_DBLTYPE * const restrict PRIM_INT__h_s_k_s = primwork + 55983;
    SIMINT_DBLTYPE * const restrict PRIM_INT__h_s_l_s = primwork + 60519;
    SIMINT_DBLTYPE * const restrict PRIM_INT__h_s_m_s = primwork + 65244;
    SIMINT_DBLTYPE * const restrict PRIM_INT__h_s_n_s = primwork + 69864;
    SIMINT_DBLTYPE * const restrict PRIM_INT__i_s_s_s = primwork + 74022;
    SIMINT_DBLTYPE * const restrict PRIM_INT__i_s_p_s = primwork + 74610;
    SIMINT_DBLTYPE * const restrict PRIM_INT__i_s_d_s = primwork + 75618;
    SIMINT_DBLTYPE * const restrict PRIM_INT__i_s_f_s = primwork + 77466;
    SIMINT_DBLTYPE * const restrict PRIM_INT__i_s_g_s = primwork + 80266;
    SIMINT_DBLTYPE * const restrict PRIM_INT__i_s_h_s = primwork + 84046;
    SIMINT_DBLTYPE * const restrict PRIM_INT__i_s_i_s = primwork + 88750;
    SIMINT_DBLTYPE * const restrict PRIM_INT__i_s_k_s = primwork + 94238;
    SIMINT_DBLTYPE * const restrict PRIM_INT__i_s_l_s = primwork + 100286;
    SIMINT_DBLTYPE * const restrict PRIM_INT__i_s_m_s = primwork + 106586;
    SIMINT_DBLTYPE * const restrict PRIM_INT__i_s_n_s = primwork + 112746;
    SIMINT_DBLTYPE * const restrict PRIM_INT__i_s_o_s = primwork + 118290;
    SIMINT_DBLTYPE * const restrict PRIM_INT__k_s_s_s = primwork + 122658;
    SIMINT_DBLTYPE * const restrict PRIM_INT__k_s_p_s = primwork + 123378;
    SIMINT_DBLTYPE * const restrict PRIM_INT__k_s_d_s = primwork + 124674;
    SIMINT_DBLTYPE * const restrict PRIM_INT__k_s_f_s = primwork + 127050;
    SIMINT_DBLTYPE * const restrict PRIM_INT__k_s_g_s = primwork + 130650;
    SIMINT_DBLTYPE * const restrict PRIM_INT__k_s_h_s = primwork + 135510;
    SIMINT_DBLTYPE * const restrict PRIM_INT__k_s_i_s = primwork + 141558;
    SIMINT_DBLTYPE * const restrict PRIM_INT__k_s_k_s = primwork + 148614;
    SIMINT_DBLTYPE * const restrict PRIM_INT__k_s_l_s = primwork + 156390;
    SIMINT_DBLTYPE * const restrict PRIM_INT__k_s_m_s = primwork + 164490;
    SIMINT_DBLTYPE * const restrict PRIM_INT__k_s_n_s = primwork + 172410;
    SIMINT_DBLTYPE * const restrict PRIM_INT__k_s_o_s = primwork + 179538;
    SIMINT_DBLTYPE * const restrict PRIM_INT__k_s_q_s = primwork + 185154;
    SIMINT_DBLTYPE * const restrict PRIM_INT__l_s_s_s = primwork + 188430;
    SIMINT_DBLTYPE * const restrict PRIM_INT__l_s_p_s = primwork + 189285;
    SIMINT_DBLTYPE * const restrict PRIM_INT__l_s_d_s = primwork + 190905;
    SIMINT_DBLTYPE * const restrict PRIM_INT__l_s_f_s = primwork + 193875;
    SIMINT_DBLTYPE * const restrict PRIM_INT__l_s_g_s = primwork + 198375;
    SIMINT_DBLTYPE * const restrict PRIM_INT__l_s_h_s = primwork + 204450;
    SIMINT_DBLTYPE * const restrict PRIM_INT__l_s_i_s = primwork + 212010;
    SIMINT_DBLTYPE * const restrict PRIM_INT__l_s_k_s = primwork + 220830;
    SIMINT_DBLTYPE * const restrict PRIM_INT__l_s_l_s = primwork + 230550;
    SIMINT_DBLTYPE * const restrict PRIM_INT__l_s_m_s = primwork + 240675;
    SIMINT_DBLTYPE * const restrict PRIM_INT__l_s_n_s = primwork + 250575;
    SIMINT_DBLTYPE * const restrict PRIM_INT__l_s_o_s = primwork + 259485;
    SIMINT_DBLTYPE * const restrict PRIM_INT__l_s_q_s = primwork + 266505;
    SIMINT_DBLTYPE * const restrict PRIM_INT__m_s_s_s = primwork + 270600;
    SIMINT_DBLTYPE * const restrict PRIM_INT__m_s_p_s = primwork + 271590;
    SIMINT_DBLTYPE * const restrict PRIM_INT__m_s_d_s = primwork + 273570;
    SIMINT_DBLTYPE * const restrict PRIM_INT__m_s_f_s = primwork + 277200;
    SIMINT_DBLTYPE * const restrict PRIM_INT__m_s_g_s = primwork + 282700;
    SIMINT_DBLTYPE * const restrict PRIM_INT__m_s_h_s = primwork + 290125;
    SIMINT_DBLTYPE * const restrict PRIM_INT__m_s_i_s = primwork + 299365;
    SIMINT_DBLTYPE * const restrict PRIM_INT__m_s_k_s = primwork + 310145;
    SIMINT_DBLTYPE * const restrict PRIM_INT__m_s_l_s = primwork + 322025;
    SIMINT_DBLTYPE * const restrict PRIM_INT__m_s_m_s = primwork + 334400;
    SIMINT_DBLTYPE * const restrict PRIM_INT__m_s_n_s = primwork + 346500;
    SIMINT_DBLTYPE * const restrict PRIM_INT__m_s_o_s = primwork + 357390;
    SIMINT_DBLTYPE * const restrict PRIM_INT__m_s_q_s = primwork + 365970;
    SIMINT_DBLTYPE * const restrict PRIM_INT__n_s_s_s = primwork + 370975;
    SIMINT_DBLTYPE * const restrict PRIM_INT__n_s_p_s = primwork + 372097;
    SIMINT_DBLTYPE * const restrict PRIM_INT__n_s_d_s = primwork + 374473;
    SIMINT_DBLTYPE * const restrict PRIM_INT__n_s_f_s = primwork + 378829;
    SIMINT_DBLTYPE * const restrict PRIM_INT__n_s_g_s = primwork + 385429;
    SIMINT_DBLTYPE * const restrict PRIM_INT__n_s_h_s = primwork + 394339;
    SIMINT_DBLTYPE * const restrict PRIM_INT__n_s_i_s = primwork + 405427;
    SIMINT_DBLTYPE * const restrict PRIM_INT__n_s_k_s = primwork + 418363;
    SIMINT_DBLTYPE * const restrict PRIM_INT__n_s_l_s = primwork + 432619;
    SIMINT_DBLTYPE * const restrict PRIM_INT__n_s_m_s = primwork + 447469;
    SIMINT_DBLTYPE * const restrict PRIM_INT__n_s_n_s = primwork + 461989;
    SIMINT_DBLTYPE * const restrict PRIM_INT__n_s_o_s = primwork + 475057;
    SIMINT_DBLTYPE * const restrict PRIM_INT__n_s_q_s = primwork + 485353;
    SIMINT_DBLTYPE * const restrict PRIM_INT__o_s_s_s = primwork + 491359;
    SIMINT_DBLTYPE * const restrict PRIM_INT__o_s_p_s = primwork + 492607;
    SIMINT_DBLTYPE * const restrict PRIM_INT__o_s_d_s = primwork + 495415;
    SIMINT_DBLTYPE * const restrict PRIM_INT__o_s_f_s = primwork + 500563;
    SIMINT_DBLTYPE * const restrict PRIM_INT__o_s_g_s = primwork + 508363;
    SIMINT_DBLTYPE * const restrict PRIM_INT__o_s_h_s = primwork + 518893;
    SIMINT_DBLTYPE * const restrict PRIM_INT__o_s_i_s = primwork + 531997;
    SIMINT_DBLTYPE * const restrict PRIM_INT__o_s_k_s = primwork + 547285;
    SIMINT_DBLTYPE * const restrict PRIM_INT__o_s_l_s = primwork + 564133;
    SIMINT_DBLTYPE * const restrict PRIM_INT__o_s_m_s = primwork + 581683;
    SIMINT_DBLTYPE * const restrict PRIM_INT__o_s_n_s = primwork + 598843;
    SIMINT_DBLTYPE * const restrict PRIM_INT__o_s_o_s = primwork + 614287;
    SIMINT_DBLTYPE * const restrict PRIM_INT__o_s_q_s = primwork + 626455;
    SIMINT_DBLTYPE * const restrict PRIM_INT__q_s_s_s = primwork + 633553;
    SIMINT_DBLTYPE * const restrict PRIM_INT__q_s_p_s = primwork + 634918;
    SIMINT_DBLTYPE * const restrict PRIM_INT__q_s_d_s = primwork + 638194;
    SIMINT_DBLTYPE * const restrict PRIM_INT__q_s_f_s = primwork + 644200;
    SIMINT_DBLTYPE * const restrict PRIM_INT__q_s_g_s = primwork + 653300;
    SIMINT_DBLTYPE * const restrict PRIM_INT__q_s_h_s = primwork + 665585;
    SIMINT_DBLTYPE * const restrict PRIM_INT__q_s_i_s = primwork + 680873;
    SIMINT_DBLTYPE * const restrict PRIM_INT__q_s_k_s = primwork + 698709;
    SIMINT_DBLTYPE * const restrict PRIM_INT__q_s_l_s = primwork + 718365;
    SIMINT_DBLTYPE * const restrict PRIM_INT__q_s_m_s = primwork + 738840;
    SIMINT_DBLTYPE * const restrict PRIM_INT__q_s_n_s = primwork + 758860;
    SIMINT_DBLTYPE * const restrict PRIM_INT__q_s_o_s = primwork + 776878;
    SIMINT_DBLTYPE * const restrict PRIM_INT__q_s_q_s = primwork + 791074;
    SIMINT_DBLTYPE * const restrict PRIM_INT__r_s_s_s = primwork + 799355;
    SIMINT_DBLTYPE * const restrict PRIM_INT__r_s_p_s = primwork + 800825;
    SIMINT_DBLTYPE * const restrict PRIM_INT__r_s_d_s = primwork + 804605;
    SIMINT_DBLTYPE * const restrict PRIM_INT__r_s_f_s = primwork + 811535;
    SIMINT_DBLTYPE * const restrict PRIM_INT__r_s_g_s = primwork + 822035;
    SIMINT_DBLTYPE * const restrict PRIM_INT__r_s_h_s = primwork + 836210;
    SIMINT_DBLTYPE * const restrict PRIM_INT__r_s_i_s = primwork + 853850;
    SIMINT_DBLTYPE * const restrict PRIM_INT__r_s_k_s = primwork + 874430;
    SIMINT_DBLTYPE * const restrict PRIM_INT__r_s_l_s = primwork + 897110;
    SIMINT_DBLTYPE * const restrict PRIM_INT__r_s_m_s = primwork + 920735;
    SIMINT_DBLTYPE * const restrict PRIM_INT__r_s_n_s = primwork + 943835;
    SIMINT_DBLTYPE * const restrict PRIM_INT__r_s_o_s = primwork + 964625;
    SIMINT_DBLTYPE * const restrict PRIM_INT__r_s_q_s = primwork + 981005;
    SIMINT_DBLTYPE * const restrict PRIM_INT__t_s_s_s = primwork + 990560;
    SIMINT_DBLTYPE * const restrict PRIM_INT__t_s_p_s = primwork + 992120;
    SIMINT_DBLTYPE * const restrict PRIM_INT__t_s_d_s = primwork + 996440;
    SIMINT_DBLTYPE * const restrict PRIM_INT__t_s_f_s = primwork + 1004360;
    SIMINT_DBLTYPE * const restrict PRIM_INT__t_s_g_s = primwork + 1016360;
    SIMINT_DBLTYPE * const restrict PRIM_INT__t_s_h_s = primwork + 1032560;
    SIMINT_DBLTYPE * const restrict PRIM_INT__t_s_i_s = primwork + 1052720;
    SIMINT_DBLTYPE * const restrict PRIM_INT__t_s_k_s = primwork + 1076240;
    SIMINT_DBLTYPE * const restrict PRIM_INT__t_s_l_s = primwork + 1102160;
    SIMINT_DBLTYPE * const restrict PRIM_INT__t_s_m_s = primwork + 1129160;
    SIMINT_DBLTYPE * const restrict PRIM_INT__t_s_n_s = primwork + 1155560;
    SIMINT_DBLTYPE * const restrict PRIM_INT__t_s_o_s = primwork + 1179320;
    SIMINT_DBLTYPE * const restrict PRIM_INT__t_s_q_s = primwork + 1198040;
    double * const hrrwork = (double *)(primwork + 1208960);
    double * const HRR_INT__k_p_i_s = hrrwork + 0;
    double * const HRR_INT__k_p_k_s = hrrwork + 3024;
    double * const HRR_INT__k_p_l_s = hrrwork + 6912;
    double * const HRR_INT__k_p_m_s = hrrwork + 11772;
    double * const HRR_INT__k_p_n_s = hrrwork + 17712;
    double * const HRR_INT__k_p_o_s = hrrwork + 24840;
    double * const HRR_INT__k_p_q_s = hrrwork + 33264;
    double * const HRR_INT__k_d_i_s = hrrwork + 43092;
    double * const HRR_INT__k_d_k_s = hrrwork + 49140;
    double * const HRR_INT__k_d_l_s = hrrwork + 56916;
    double * const HRR_INT__k_d_m_s = hrrwork + 66636;
    double * const HRR_INT__k_d_n_s = hrrwork + 78516;
    double * const HRR_INT__k_d_o_s = hrrwork + 92772;
    double * const HRR_INT__k_d_q_s = hrrwork + 109620;
    double * const HRR_INT__k_f_i_s = hrrwork + 129276;
    double * const HRR_INT__k_f_k_s = hrrwork + 139356;
    double * const HRR_INT__k_f_l_s = hrrwork + 152316;
    double * const HRR_INT__k_f_m_s = hrrwork + 168516;
    double * const HRR_INT__k_f_n_s = hrrwork + 188316;
    double * const HRR_INT__k_f_o_s = hrrwork + 212076;
    double * const HRR_INT__k_f_q_s = hrrwork + 240156;
    double * const HRR_INT__k_g_i_s = hrrwork + 272916;
    double * const HRR_INT__k_g_k_s = hrrwork + 288036;
    double * const HRR_INT__k_g_l_s = hrrwork + 307476;
    double * const HRR_INT__k_g_m_s = hrrwork + 331776;
    double * const HRR_INT__k_g_n_s = hrrwork + 361476;
    double * const HRR_INT__k_g_o_s = hrrwork + 397116;
    double * const HRR_INT__k_g_q_s = hrrwork + 439236;
    double * const HRR_INT__k_h_i_s = hrrwork + 488376;
    double * const HRR_INT__k_h_k_s = hrrwork + 509544;
    double * const HRR_INT__k_h_l_s = hrrwork + 536760;
    double * const HRR_INT__k_h_m_s = hrrwork + 570780;
    double * const HRR_INT__k_h_n_s = hrrwork + 612360;
    double * const HRR_INT__k_h_o_s = hrrwork + 662256;
    double * const HRR_INT__k_h_q_s = hrrwork + 721224;
    double * const HRR_INT__k_i_i_s = hrrwork + 790020;
    double * const HRR_INT__k_i_k_s = hrrwork + 818244;
    double * const HRR_INT__k_i_l_s = hrrwork + 854532;
    double * const HRR_INT__k_i_m_s = hrrwork + 899892;
    double * const HRR_INT__k_i_n_s = hrrwork + 955332;
    double * const HRR_INT__k_i_o_s = hrrwork + 1021860;
    double * const HRR_INT__k_i_q_s = hrrwork + 1100484;
    double * const HRR_INT__k_k_i_s = hrrwork + 1192212;
    double * const HRR_INT__k_k_i_p = hrrwork + 1228500;
    double * const HRR_INT__k_k_i_d = hrrwork + 1337364;
    double * const HRR_INT__k_k_i_f = hrrwork + 1555092;
    double * const HRR_INT__k_k_i_g = hrrwork + 1917972;
    double * const HRR_INT__k_k_i_h = hrrwork + 2462292;
    double * const HRR_INT__k_k_k_s = hrrwork + 3224340;
    double * const HRR_INT__k_k_k_p = hrrwork + 3270996;
    double * const HRR_INT__k_k_k_d = hrrwork + 3410964;
    double * const HRR_INT__k_k_k_f = hrrwork + 3690900;
    double * const HRR_INT__k_k_k_g = hrrwork + 4157460;
    double * const HRR_INT__k_k_k_h = hrrwork + 4857300;
    double * const HRR_INT__k_k_l_s = hrrwork + 5837076;
    double * const HRR_INT__k_k_l_p = hrrwork + 5895396;
    double * const HRR_INT__k_k_l_d = hrrwork + 6070356;
    double * const HRR_INT__k_k_l_f = hrrwork + 6420276;
    double * const HRR_INT__k_k_l_g = hrrwork + 7003476;
    double * const HRR_INT__k_k_m_s = hrrwork + 7878276;
    double * const HRR_INT__k_k_m_p = hrrwork + 7949556;
    double * const HRR_INT__k_k_m_d = hrrwork + 8163396;
    double * const HRR_INT__k_k_m_f = hrrwork + 8591076;
    double * const HRR_INT__k_k_n_s = hrrwork + 9303876;
    double * const HRR_INT__k_k_n_p = hrrwork + 9389412;
    double * const HRR_INT__k_k_n_d = hrrwork + 9646020;
    double * const HRR_INT__k_k_o_s = hrrwork + 10159236;
    double * const HRR_INT__k_k_o_p = hrrwork + 10260324;
    double * const HRR_INT__k_k_q_s = hrrwork + 10563588;
    double * const HRR_INT__l_p_i_s = hrrwork + 10681524;
    double * const HRR_INT__l_p_k_s = hrrwork + 10685304;
    double * const HRR_INT__l_p_l_s = hrrwork + 10690164;
    double * const HRR_INT__l_p_m_s = hrrwork + 10696239;
    double * const HRR_INT__l_p_n_s = hrrwork + 10703664;
    double * const HRR_INT__l_p_o_s = hrrwork + 10712574;
    double * const HRR_INT__l_p_q_s = hrrwork + 10723104;
    double * const HRR_INT__l_d_i_s = hrrwork + 10735389;
    double * const HRR_INT__l_d_k_s = hrrwork + 10742949;
    double * const HRR_INT__l_d_l_s = hrrwork + 10752669;
    double * const HRR_INT__l_d_m_s = hrrwork + 10764819;
    double * const HRR_INT__l_d_n_s = hrrwork + 10779669;
    double * const HRR_INT__l_d_o_s = hrrwork + 10797489;
    double * const HRR_INT__l_d_q_s = hrrwork + 10818549;
    double * const HRR_INT__l_f_i_s = hrrwork + 10843119;
    double * const HRR_INT__l_f_k_s = hrrwork + 10855719;
    double * const HRR_INT__l_f_l_s = hrrwork + 10871919;
    double * const HRR_INT__l_f_m_s = hrrwork + 10892169;
    double * const HRR_INT__l_f_n_s = hrrwork + 10916919;
    double * const HRR_INT__l_f_o_s = hrrwork + 10946619;
    double * const HRR_INT__l_f_q_s = hrrwork + 10981719;
    double * const HRR_INT__l_g_i_s = hrrwork + 11022669;
    double * const HRR_INT__l_g_k_s = hrrwork + 11041569;
    double * const HRR_INT__l_g_l_s = hrrwork + 11065869;
    double * const HRR_INT__l_g_m_s = hrrwork + 11096244;
    double * const HRR_INT__l_g_n_s = hrrwork + 11133369;
    double * const HRR_INT__l_g_o_s = hrrwork + 11177919;
    double * const HRR_INT__l_g_q_s = hrrwork + 11230569;
    double * const HRR_INT__l_h_i_s = hrrwork + 11291994;
    double * const HRR_INT__l_h_k_s = hrrwork + 11318454;
    double * const HRR_INT__l_h_l_s = hrrwork + 11352474;
    double * const HRR_INT__l_h_m_s = hrrwork + 11394999;
    double * const HRR_INT__l_h_n_s = hrrwork + 11446974;
    double * const HRR_INT__l_h_o_s = hrrwork + 11509344;
    double * const HRR_INT__l_h_q_s = hrrwork + 11583054;
    double * const HRR_INT__l_i_i_s = hrrwork + 11669049;
    double * const HRR_INT__l_i_k_s = hrrwork + 11704329;
    double * const HRR_INT__l_i_l_s = hrrwork + 11749689;
    double * const HRR_INT__l_i_m_s = hrrwork + 11806389;
    double * const HRR_INT__l_i_n_s = hrrwork + 11875689;
    double * const HRR_INT__l_i_o_s = hrrwork + 11958849;
    double * const HRR_INT__l_i_q_s = hrrwork + 12057129;
    double * const HRR_INT__m_p_i_s = hrrwork + 12171789;
    double * const HRR_INT__m_p_k_s = hrrwork + 12176409;
    double * const HRR_INT__m_p_l_s = hrrwork + 12182349;
    double * const HRR_INT__m_p_m_s = hrrwork + 12189774;
    double * const HRR_INT__m_p_n_s = hrrwork + 12198849;
    double * const HRR_INT__m_p_o_s = hrrwork + 12209739;
    double * const HRR_INT__m_p_q_s = hrrwork + 12222609;
    double * const HRR_INT__m_d_i_s = hrrwork + 12237624;
    double * const HRR_INT__m_d_k_s = hrrwork + 12246864;
    double * const HRR_INT__m_d_l_s = hrrwork + 12258744;
    double * const HRR_INT__m_d_m_s = hrrwork + 12273594;
    double * const HRR_INT__m_d_n_s = hrrwork + 12291744;
    double * const HRR_INT__m_d_o_s = hrrwork + 12313524;
    double * const HRR_INT__m_d_q_s = hrrwork + 12339264;
    double * const HRR_INT__m_f_i_s = hrrwork + 12369294;
    double * const HRR_INT__m_f_k_s = hrrwork + 12384694;
    double * const HRR_INT__m_f_l_s = hrrwork + 12404494;
    double * const HRR_INT__m_f_m_s = hrrwork + 12429244;
    double * const HRR_INT__m_f_n_s = hrrwork + 12459494;
    double * const HRR_INT__m_f_o_s = hrrwork + 12495794;
    double * const HRR_INT__m_f_q_s = hrrwork + 12538694;
    double * const HRR_INT__m_g_i_s = hrrwork + 12588744;
    double * const HRR_INT__m_g_k_s = hrrwork + 12611844;
    double * const HRR_INT__m_g_l_s = hrrwork + 12641544;
    double * const HRR_INT__m_g_m_s = hrrwork + 12678669;
    double * const HRR_INT__m_g_n_s = hrrwork + 12724044;
    double * const HRR_INT__m_g_o_s = hrrwork + 12778494;
    double * const HRR_INT__m_g_q_s = hrrwork + 12842844;
    double * const HRR_INT__m_h_i_s = hrrwork + 12917919;
    double * const HRR_INT__m_h_k_s = hrrwork + 12950259;
    double * const HRR_INT__m_h_l_s = hrrwork + 12991839;
    double * const HRR_INT__m_h_m_s = hrrwork + 13043814;
    double * const HRR_INT__m_h_n_s = hrrwork + 13107339;
    double * const HRR_INT__m_h_o_s = hrrwork + 13183569;
    double * const HRR_INT__m_h_q_s = hrrwork + 13273659;
    double * const HRR_INT__n_p_i_s = hrrwork + 13378764;
    double * const HRR_INT__n_p_k_s = hrrwork + 13384308;
    double * const HRR_INT__n_p_l_s = hrrwork + 13391436;
    double * const HRR_INT__n_p_m_s = hrrwork + 13400346;
    double * const HRR_INT__n_p_n_s = hrrwork + 13411236;
    double * const HRR_INT__n_p_o_s = hrrwork + 13424304;
    double * const HRR_INT__n_p_q_s = hrrwork + 13439748;
    double * const HRR_INT__n_d_i_s = hrrwork + 13457766;
    double * const HRR_INT__n_d_k_s = hrrwork + 13468854;
    double * const HRR_INT__n_d_l_s = hrrwork + 13483110;
    double * const HRR_INT__n_d_m_s = hrrwork + 13500930;
    double * const HRR_INT__n_d_n_s = hrrwork + 13522710;
    double * const HRR_INT__n_d_o_s = hrrwork + 13548846;
    double * const HRR_INT__n_d_q_s = hrrwork + 13579734;
    double * const HRR_INT__n_f_i_s = hrrwork + 13615770;
    double * const HRR_INT__n_f_k_s = hrrwork + 13634250;
    double * const HRR_INT__n_f_l_s = hrrwork + 13658010;
    double * const HRR_INT__n_f_m_s = hrrwork + 13687710;
    double * const HRR_INT__n_f_n_s = hrrwork + 13724010;
    double * const HRR_INT__n_f_o_s = hrrwork + 13767570;
    double * const HRR_INT__n_f_q_s = hrrwork + 13819050;
    double * const HRR_INT__n_g_i_s = hrrwork + 13879110;
    double * const HRR_INT__n_g_k_s = hrrwork + 13906830;
    double * const HRR_INT__n_g_l_s = hrrwork + 13942470;
    double * const HRR_INT__n_g_m_s = hrrwork + 13987020;
    double * const HRR_INT__n_g_n_s = hrrwork + 14041470;
    double * const HRR_INT__n_g_o_s = hrrwork + 14106810;
    double * const HRR_INT__n_g_q_s = hrrwork + 14184030;
    double * const HRR_INT__o_p_i_s = hrrwork + 14274120;
    double * const HRR_INT__o_p_k_s = hrrwork + 14280672;
    double * const HRR_INT__o_p_l_s = hrrwork + 14289096;
    double * const HRR_INT__o_p_m_s = hrrwork + 14299626;
    double * const HRR_INT__o_p_n_s = hrrwork + 14312496;
    double * const HRR_INT__o_p_o_s = hrrwork + 14327940;
    double * const HRR_INT__o_p_q_s = hrrwork + 14346192;
    double * const HRR_INT__o_d_i_s = hrrwork + 14367486;
    double * const HRR_INT__o_d_k_s = hrrwork + 14380590;
    double * const HRR_INT__o_d_l_s = hrrwork + 14397438;
    double * const HRR_INT__o_d_m_s = hrrwork + 14418498;
    double * const HRR_INT__o_d_n_s = hrrwork + 14444238;
    double * const HRR_INT__o_d_o_s = hrrwork + 14475126;
    double * const HRR_INT__o_d_q_s = hrrwork + 14511630;
    double * const HRR_INT__o_f_i_s = hrrwork + 14554218;
    double * const HRR_INT__o_f_k_s = hrrwork + 14576058;
    double * const HRR_INT__o_f_l_s = hrrwork + 14604138;
    double * const HRR_INT__o_f_m_s = hrrwork + 14639238;
    double * const HRR_INT__o_f_n_s = hrrwork + 14682138;
    double * const HRR_INT__o_f_o_s = hrrwork + 14733618;
    double * const HRR_INT__o_f_q_s = hrrwork + 14794458;
    double * const HRR_INT__q_p_i_s = hrrwork + 14865438;
    double * const HRR_INT__q_p_k_s = hrrwork + 14873082;
    double * const HRR_INT__q_p_l_s = hrrwork + 14882910;
    double * const HRR_INT__q_p_m_s = hrrwork + 14895195;
    double * const HRR_INT__q_p_n_s = hrrwork + 14910210;
    double * const HRR_INT__q_p_o_s = hrrwork + 14928228;
    double * const HRR_INT__q_p_q_s = hrrwork + 14949522;
    double * const HRR_INT__q_d_i_s = hrrwork + 14974365;
    double * const HRR_INT__q_d_k_s = hrrwork + 14989653;
    double * const HRR_INT__q_d_l_s = hrrwork + 15009309;
    double * const HRR_INT__q_d_m_s = hrrwork + 15033879;
    double * const HRR_INT__q_d_n_s = hrrwork + 15063909;
    double * const HRR_INT__q_d_o_s = hrrwork + 15099945;
    double * const HRR_INT__q_d_q_s = hrrwork + 15142533;
    double * const HRR_INT__r_p_i_s = hrrwork + 15192219;
    double * const HRR_INT__r_p_k_s = hrrwork + 15201039;
    double * const HRR_INT__r_p_l_s = hrrwork + 15212379;
    double * const HRR_INT__r_p_m_s = hrrwork + 15226554;
    double * const HRR_INT__r_p_n_s = hrrwork + 15243879;
    double * const HRR_INT__r_p_o_s = hrrwork + 15264669;
    double * const HRR_INT__r_p_q_s = hrrwork + 15289239;


    // 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_14 = SIMINT_DBLSET1(14);
    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 * 237804 * 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__k_s_i_s = INT__k_s_i_s + abcd * 1008;
                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__l_s_i_s = INT__l_s_i_s + abcd * 1260;
                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__m_s_i_s = INT__m_s_i_s + abcd * 1540;
                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__n_s_i_s = INT__n_s_i_s + abcd * 1848;
                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__o_s_i_s = INT__o_s_i_s + abcd * 2184;
                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__q_s_i_s = INT__q_s_i_s + abcd * 2548;
                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__r_s_i_s = INT__r_s_i_s + abcd * 2940;
                double * restrict PRIM_PTR_INT__r_s_k_s = INT__r_s_k_s + abcd * 3780;
                double * restrict PRIM_PTR_INT__r_s_l_s = INT__r_s_l_s + abcd * 4725;
                double * restrict PRIM_PTR_INT__r_s_m_s = INT__r_s_m_s + abcd * 5775;
                double * restrict PRIM_PTR_INT__r_s_n_s = INT__r_s_n_s + abcd * 6930;
                double * restrict PRIM_PTR_INT__r_s_o_s = INT__r_s_o_s + abcd * 8190;
                double * restrict PRIM_PTR_INT__r_s_q_s = INT__r_s_q_s + abcd * 9555;
                double * restrict PRIM_PTR_INT__t_s_i_s = INT__t_s_i_s + abcd * 3360;
                double * restrict PRIM_PTR_INT__t_s_k_s = INT__t_s_k_s + abcd * 4320;
                double * restrict PRIM_PTR_INT__t_s_l_s = INT__t_s_l_s + abcd * 5400;
                double * restrict PRIM_PTR_INT__t_s_m_s = INT__t_s_m_s + abcd * 6600;
                double * restrict PRIM_PTR_INT__t_s_n_s = INT__t_s_n_s + abcd * 7920;
                double * restrict PRIM_PTR_INT__t_s_o_s = INT__t_s_o_s + abcd * 9360;
                double * restrict PRIM_PTR_INT__t_s_q_s = INT__t_s_q_s + abcd * 10920;



                // 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__k_s_i_s += 1008;
                            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__l_s_i_s += 1260;
                            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__m_s_i_s += 1540;
                            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__n_s_i_s += 1848;
                            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__o_s_i_s += 2184;
                            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__q_s_i_s += 2548;
                            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__r_s_i_s += 2940;
                            PRIM_PTR_INT__r_s_k_s += 3780;
                            PRIM_PTR_INT__r_s_l_s += 4725;
                            PRIM_PTR_INT__r_s_m_s += 5775;
                            PRIM_PTR_INT__r_s_n_s += 6930;
                            PRIM_PTR_INT__r_s_o_s += 8190;
                            PRIM_PTR_INT__r_s_q_s += 9555;
                            PRIM_PTR_INT__t_s_i_s += 3360;
                            PRIM_PTR_INT__t_s_k_s += 4320;
                            PRIM_PTR_INT__t_s_l_s += 5400;
                            PRIM_PTR_INT__t_s_m_s += 6600;
                            PRIM_PTR_INT__t_s_n_s += 7920;
                            PRIM_PTR_INT__t_s_o_s += 9360;
                            PRIM_PTR_INT__t_s_q_s += 10920;
                        }
                        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__k_s_i_s += lastoffset*1008;
                            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__l_s_i_s += lastoffset*1260;
                            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__m_s_i_s += lastoffset*1540;
                            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__n_s_i_s += lastoffset*1848;
                            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__o_s_i_s += lastoffset*2184;
                            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__q_s_i_s += lastoffset*2548;
                            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__r_s_i_s += lastoffset*2940;
                            PRIM_PTR_INT__r_s_k_s += lastoffset*3780;
                            PRIM_PTR_INT__r_s_l_s += lastoffset*4725;
                            PRIM_PTR_INT__r_s_m_s += lastoffset*5775;
                            PRIM_PTR_INT__r_s_n_s += lastoffset*6930;
                            PRIM_PTR_INT__r_s_o_s += lastoffset*8190;
                            PRIM_PTR_INT__r_s_q_s += lastoffset*9555;
                            PRIM_PTR_INT__t_s_i_s += lastoffset*3360;
                            PRIM_PTR_INT__t_s_k_s += lastoffset*4320;
                            PRIM_PTR_INT__t_s_l_s += lastoffset*5400;
                            PRIM_PTR_INT__t_s_m_s += lastoffset*6600;
                            PRIM_PTR_INT__t_s_n_s += lastoffset*7920;
                            PRIM_PTR_INT__t_s_o_s += lastoffset*9360;
                            PRIM_PTR_INT__t_s_q_s += lastoffset*10920;
                            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: 26
                    //////////////////////////////////////////////
                    // 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, 26);
                    SIMINT_DBLTYPE prefac = SIMINT_SQRT(one_over_PQalpha_sum);
                    prefac = SIMINT_MUL(SIMINT_MUL(P_prefac, Q_prefac), prefac);
                    for(n = 0; n <= 26; 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_12_over_2p = SIMINT_MUL(const_12, one_over_2p);
                    const SIMINT_DBLTYPE vrr_const_13_over_2p = SIMINT_MUL(const_13, 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_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);
                    const SIMINT_DBLTYPE vrr_const_14_over_2pq = SIMINT_MUL(const_14, one_over_2pq);



                    // Forming PRIM_INT__p_s_s_s[26 * 3];
                    for(n = 0; n < 26; ++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_s_s[25 * 6];
                    for(n = 0; n < 25; ++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 + 1] = SIMINT_MUL(P_PA[1], PRIM_INT__p_s_s_s[n * 3 + 0]);
                        PRIM_INT__d_s_s_s[n * 6 + 1] = SIMINT_FMADD( aop_PQ[1], PRIM_INT__p_s_s_s[(n+1) * 3 + 0], PRIM_INT__d_s_s_s[n * 6 + 1]);

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

                        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 + 4] = SIMINT_MUL(P_PA[2], PRIM_INT__p_s_s_s[n * 3 + 1]);
                        PRIM_INT__d_s_s_s[n * 6 + 4] = SIMINT_FMADD( aop_PQ[2], PRIM_INT__p_s_s_s[(n+1) * 3 + 1], PRIM_INT__d_s_s_s[n * 6 + 4]);

                        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]);

                    }



                    // Forming PRIM_INT__f_s_s_s[24 * 10];
                    for(n = 0; n < 24; ++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 + 1] = SIMINT_MUL(P_PA[1], PRIM_INT__d_s_s_s[n * 6 + 0]);
                        PRIM_INT__f_s_s_s[n * 10 + 1] = SIMINT_FMADD( aop_PQ[1], PRIM_INT__d_s_s_s[(n+1) * 6 + 0], PRIM_INT__f_s_s_s[n * 10 + 1]);

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

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

                        PRIM_INT__f_s_s_s[n * 10 + 4] = SIMINT_MUL(P_PA[2], PRIM_INT__d_s_s_s[n * 6 + 1]);
                        PRIM_INT__f_s_s_s[n * 10 + 4] = SIMINT_FMADD( aop_PQ[2], PRIM_INT__d_s_s_s[(n+1) * 6 + 1], PRIM_INT__f_s_s_s[n * 10 + 4]);

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

                        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 + 7] = SIMINT_MUL(P_PA[2], PRIM_INT__d_s_s_s[n * 6 + 3]);
                        PRIM_INT__f_s_s_s[n * 10 + 7] = SIMINT_FMADD( aop_PQ[2], PRIM_INT__d_s_s_s[(n+1) * 6 + 3], PRIM_INT__f_s_s_s[n * 10 + 7]);

                        PRIM_INT__f_s_s_s[n * 10 + 8] = SIMINT_MUL(P_PA[1], PRIM_INT__d_s_s_s[n * 6 + 5]);
                        PRIM_INT__f_s_s_s[n * 10 + 8] = SIMINT_FMADD( aop_PQ[1], PRIM_INT__d_s_s_s[(n+1) * 6 + 5], PRIM_INT__f_s_s_s[n * 10 + 8]);

                        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_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,
                            23);


                    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,
                            22);


                    ostei_general_vrr1_I(6, 21,
                            one_over_2p, a_over_p, aop_PQ, P_PA,
                            PRIM_INT__h_s_s_s, PRIM_INT__g_s_s_s, PRIM_INT__i_s_s_s);


                    ostei_general_vrr1_I(7, 20,
                            one_over_2p, a_over_p, aop_PQ, P_PA,
                            PRIM_INT__i_s_s_s, PRIM_INT__h_s_s_s, PRIM_INT__k_s_s_s);


                    ostei_general_vrr_K(7, 0, 1, 0, 12,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__k_s_s_s, NULL, NULL, PRIM_INT__i_s_s_s, NULL, PRIM_INT__k_s_p_s);


                    ostei_general_vrr_K(6, 0, 1, 0, 12,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__i_s_s_s, NULL, NULL, PRIM_INT__h_s_s_s, NULL, PRIM_INT__i_s_p_s);


                    ostei_general_vrr_K(7, 0, 2, 0, 11,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__k_s_p_s, PRIM_INT__k_s_s_s, NULL, PRIM_INT__i_s_p_s, NULL, PRIM_INT__k_s_d_s);


                    ostei_general_vrr_K(5, 0, 1, 0, 12,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__h_s_s_s, NULL, NULL, PRIM_INT__g_s_s_s, NULL, PRIM_INT__h_s_p_s);


                    ostei_general_vrr_K(6, 0, 2, 0, 11,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__i_s_p_s, PRIM_INT__i_s_s_s, NULL, PRIM_INT__h_s_p_s, NULL, PRIM_INT__i_s_d_s);


                    ostei_general_vrr_K(7, 0, 3, 0, 10,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__k_s_d_s, PRIM_INT__k_s_p_s, NULL, PRIM_INT__i_s_d_s, NULL, PRIM_INT__k_s_f_s);


                    VRR_K_g_s_p_s(
                            PRIM_INT__g_s_p_s,
                            PRIM_INT__g_s_s_s,
                            PRIM_INT__f_s_s_s,
                            Q_PA,
                            aoq_PQ,
                            one_over_2pq,
                            12);


                    ostei_general_vrr_K(5, 0, 2, 0, 11,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__h_s_p_s, PRIM_INT__h_s_s_s, NULL, PRIM_INT__g_s_p_s, NULL, PRIM_INT__h_s_d_s);


                    ostei_general_vrr_K(6, 0, 3, 0, 10,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__i_s_d_s, PRIM_INT__i_s_p_s, NULL, PRIM_INT__h_s_d_s, NULL, PRIM_INT__i_s_f_s);


                    ostei_general_vrr_K(7, 0, 4, 0, 9,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__k_s_f_s, PRIM_INT__k_s_d_s, NULL, PRIM_INT__i_s_f_s, NULL, PRIM_INT__k_s_g_s);


                    VRR_K_f_s_p_s(
                            PRIM_INT__f_s_p_s,
                            PRIM_INT__f_s_s_s,
                            PRIM_INT__d_s_s_s,
                            Q_PA,
                            aoq_PQ,
                            one_over_2pq,
                            12);


                    ostei_general_vrr_K(4, 0, 2, 0, 11,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__g_s_p_s, PRIM_INT__g_s_s_s, NULL, PRIM_INT__f_s_p_s, NULL, PRIM_INT__g_s_d_s);


                    ostei_general_vrr_K(5, 0, 3, 0, 10,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__h_s_d_s, PRIM_INT__h_s_p_s, NULL, PRIM_INT__g_s_d_s, NULL, PRIM_INT__h_s_f_s);


                    ostei_general_vrr_K(6, 0, 4, 0, 9,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__i_s_f_s, PRIM_INT__i_s_d_s, NULL, PRIM_INT__h_s_f_s, NULL, PRIM_INT__i_s_g_s);


                    ostei_general_vrr_K(7, 0, 5, 0, 8,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__k_s_g_s, PRIM_INT__k_s_f_s, NULL, PRIM_INT__i_s_g_s, NULL, PRIM_INT__k_s_h_s);



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

                        PRIM_INT__d_s_p_s[n * 18 + 0] = SIMINT_MUL(Q_PA[0], PRIM_INT__d_s_s_s[n * 6 + 0]);
                        PRIM_INT__d_s_p_s[n * 18 + 0] = SIMINT_FMADD( aoq_PQ[0], PRIM_INT__d_s_s_s[(n+1) * 6 + 0], PRIM_INT__d_s_p_s[n * 18 + 0]);
                        PRIM_INT__d_s_p_s[n * 18 + 0] = SIMINT_FMADD( vrr_const_2_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(Q_PA[1], PRIM_INT__d_s_s_s[n * 6 + 0]);
                        PRIM_INT__d_s_p_s[n * 18 + 1] = SIMINT_FMADD( aoq_PQ[1], PRIM_INT__d_s_s_s[(n+1) * 6 + 0], PRIM_INT__d_s_p_s[n * 18 + 1]);

                        PRIM_INT__d_s_p_s[n * 18 + 2] = SIMINT_MUL(Q_PA[2], PRIM_INT__d_s_s_s[n * 6 + 0]);
                        PRIM_INT__d_s_p_s[n * 18 + 2] = SIMINT_FMADD( aoq_PQ[2], PRIM_INT__d_s_s_s[(n+1) * 6 + 0], PRIM_INT__d_s_p_s[n * 18 + 2]);

                        PRIM_INT__d_s_p_s[n * 18 + 3] = SIMINT_MUL(Q_PA[0], PRIM_INT__d_s_s_s[n * 6 + 1]);
                        PRIM_INT__d_s_p_s[n * 18 + 3] = SIMINT_FMADD( aoq_PQ[0], PRIM_INT__d_s_s_s[(n+1) * 6 + 1], PRIM_INT__d_s_p_s[n * 18 + 3]);
                        PRIM_INT__d_s_p_s[n * 18 + 3] = 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 + 3]);

                        PRIM_INT__d_s_p_s[n * 18 + 4] = SIMINT_MUL(Q_PA[1], PRIM_INT__d_s_s_s[n * 6 + 1]);
                        PRIM_INT__d_s_p_s[n * 18 + 4] = SIMINT_FMADD( aoq_PQ[1], PRIM_INT__d_s_s_s[(n+1) * 6 + 1], PRIM_INT__d_s_p_s[n * 18 + 4]);
                        PRIM_INT__d_s_p_s[n * 18 + 4] = 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 + 4]);

                        PRIM_INT__d_s_p_s[n * 18 + 5] = SIMINT_MUL(Q_PA[2], PRIM_INT__d_s_s_s[n * 6 + 1]);
                        PRIM_INT__d_s_p_s[n * 18 + 5] = SIMINT_FMADD( aoq_PQ[2], PRIM_INT__d_s_s_s[(n+1) * 6 + 1], PRIM_INT__d_s_p_s[n * 18 + 5]);

                        PRIM_INT__d_s_p_s[n * 18 + 6] = SIMINT_MUL(Q_PA[0], PRIM_INT__d_s_s_s[n * 6 + 2]);
                        PRIM_INT__d_s_p_s[n * 18 + 6] = SIMINT_FMADD( aoq_PQ[0], PRIM_INT__d_s_s_s[(n+1) * 6 + 2], PRIM_INT__d_s_p_s[n * 18 + 6]);
                        PRIM_INT__d_s_p_s[n * 18 + 6] = 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 + 6]);

                        PRIM_INT__d_s_p_s[n * 18 + 7] = SIMINT_MUL(Q_PA[1], PRIM_INT__d_s_s_s[n * 6 + 2]);
                        PRIM_INT__d_s_p_s[n * 18 + 7] = SIMINT_FMADD( aoq_PQ[1], PRIM_INT__d_s_s_s[(n+1) * 6 + 2], PRIM_INT__d_s_p_s[n * 18 + 7]);

                        PRIM_INT__d_s_p_s[n * 18 + 8] = SIMINT_MUL(Q_PA[2], PRIM_INT__d_s_s_s[n * 6 + 2]);
                        PRIM_INT__d_s_p_s[n * 18 + 8] = SIMINT_FMADD( aoq_PQ[2], PRIM_INT__d_s_s_s[(n+1) * 6 + 2], PRIM_INT__d_s_p_s[n * 18 + 8]);
                        PRIM_INT__d_s_p_s[n * 18 + 8] = 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 + 8]);

                        PRIM_INT__d_s_p_s[n * 18 + 9] = SIMINT_MUL(Q_PA[0], PRIM_INT__d_s_s_s[n * 6 + 3]);
                        PRIM_INT__d_s_p_s[n * 18 + 9] = SIMINT_FMADD( aoq_PQ[0], PRIM_INT__d_s_s_s[(n+1) * 6 + 3], PRIM_INT__d_s_p_s[n * 18 + 9]);

                        PRIM_INT__d_s_p_s[n * 18 + 10] = SIMINT_MUL(Q_PA[1], PRIM_INT__d_s_s_s[n * 6 + 3]);
                        PRIM_INT__d_s_p_s[n * 18 + 10] = SIMINT_FMADD( aoq_PQ[1], PRIM_INT__d_s_s_s[(n+1) * 6 + 3], PRIM_INT__d_s_p_s[n * 18 + 10]);
                        PRIM_INT__d_s_p_s[n * 18 + 10] = SIMINT_FMADD( vrr_const_2_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(Q_PA[2], PRIM_INT__d_s_s_s[n * 6 + 3]);
                        PRIM_INT__d_s_p_s[n * 18 + 11] = SIMINT_FMADD( aoq_PQ[2], PRIM_INT__d_s_s_s[(n+1) * 6 + 3], PRIM_INT__d_s_p_s[n * 18 + 11]);

                        PRIM_INT__d_s_p_s[n * 18 + 12] = SIMINT_MUL(Q_PA[0], PRIM_INT__d_s_s_s[n * 6 + 4]);
                        PRIM_INT__d_s_p_s[n * 18 + 12] = SIMINT_FMADD( aoq_PQ[0], PRIM_INT__d_s_s_s[(n+1) * 6 + 4], PRIM_INT__d_s_p_s[n * 18 + 12]);

                        PRIM_INT__d_s_p_s[n * 18 + 13] = SIMINT_MUL(Q_PA[1], PRIM_INT__d_s_s_s[n * 6 + 4]);
                        PRIM_INT__d_s_p_s[n * 18 + 13] = SIMINT_FMADD( aoq_PQ[1], PRIM_INT__d_s_s_s[(n+1) * 6 + 4], PRIM_INT__d_s_p_s[n * 18 + 13]);
                        PRIM_INT__d_s_p_s[n * 18 + 13] = 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 + 13]);

                        PRIM_INT__d_s_p_s[n * 18 + 14] = SIMINT_MUL(Q_PA[2], PRIM_INT__d_s_s_s[n * 6 + 4]);
                        PRIM_INT__d_s_p_s[n * 18 + 14] = SIMINT_FMADD( aoq_PQ[2], PRIM_INT__d_s_s_s[(n+1) * 6 + 4], PRIM_INT__d_s_p_s[n * 18 + 14]);
                        PRIM_INT__d_s_p_s[n * 18 + 14] = 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 + 14]);

                        PRIM_INT__d_s_p_s[n * 18 + 15] = SIMINT_MUL(Q_PA[0], PRIM_INT__d_s_s_s[n * 6 + 5]);
                        PRIM_INT__d_s_p_s[n * 18 + 15] = SIMINT_FMADD( aoq_PQ[0], PRIM_INT__d_s_s_s[(n+1) * 6 + 5], PRIM_INT__d_s_p_s[n * 18 + 15]);

                        PRIM_INT__d_s_p_s[n * 18 + 16] = SIMINT_MUL(Q_PA[1], PRIM_INT__d_s_s_s[n * 6 + 5]);
                        PRIM_INT__d_s_p_s[n * 18 + 16] = SIMINT_FMADD( aoq_PQ[1], PRIM_INT__d_s_s_s[(n+1) * 6 + 5], PRIM_INT__d_s_p_s[n * 18 + 16]);

                        PRIM_INT__d_s_p_s[n * 18 + 17] = SIMINT_MUL(Q_PA[2], PRIM_INT__d_s_s_s[n * 6 + 5]);
                        PRIM_INT__d_s_p_s[n * 18 + 17] = SIMINT_FMADD( aoq_PQ[2], PRIM_INT__d_s_s_s[(n+1) * 6 + 5], PRIM_INT__d_s_p_s[n * 18 + 17]);
                        PRIM_INT__d_s_p_s[n * 18 + 17] = SIMINT_FMADD( vrr_const_2_over_2pq, PRIM_INT__p_s_s_s[(n+1) * 3 + 2], PRIM_INT__d_s_p_s[n * 18 + 17]);

                    }


                    VRR_K_f_s_d_s(
                            PRIM_INT__f_s_d_s,
                            PRIM_INT__f_s_p_s,
                            PRIM_INT__f_s_s_s,
                            PRIM_INT__d_s_p_s,
                            Q_PA,
                            a_over_q,
                            aoq_PQ,
                            one_over_2pq,
                            one_over_2q,
                            11);


                    ostei_general_vrr_K(4, 0, 3, 0, 10,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__g_s_d_s, PRIM_INT__g_s_p_s, NULL, PRIM_INT__f_s_d_s, NULL, PRIM_INT__g_s_f_s);


                    ostei_general_vrr_K(5, 0, 4, 0, 9,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__h_s_f_s, PRIM_INT__h_s_d_s, NULL, PRIM_INT__g_s_f_s, NULL, PRIM_INT__h_s_g_s);


                    ostei_general_vrr_K(6, 0, 5, 0, 8,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__i_s_g_s, PRIM_INT__i_s_f_s, NULL, PRIM_INT__h_s_g_s, NULL, PRIM_INT__i_s_h_s);


                    ostei_general_vrr_K(7, 0, 6, 0, 7,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__k_s_h_s, PRIM_INT__k_s_g_s, NULL, PRIM_INT__i_s_h_s, NULL, PRIM_INT__k_s_i_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(Q_PA[0], PRIM_INT__p_s_s_s[n * 3 + 0]);
                        PRIM_INT__p_s_p_s[n * 9 + 0] = SIMINT_FMADD( aoq_PQ[0], PRIM_INT__p_s_s_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(Q_PA[1], PRIM_INT__p_s_s_s[n * 3 + 0]);
                        PRIM_INT__p_s_p_s[n * 9 + 1] = SIMINT_FMADD( aoq_PQ[1], PRIM_INT__p_s_s_s[(n+1) * 3 + 0], PRIM_INT__p_s_p_s[n * 9 + 1]);

                        PRIM_INT__p_s_p_s[n * 9 + 2] = SIMINT_MUL(Q_PA[2], PRIM_INT__p_s_s_s[n * 3 + 0]);
                        PRIM_INT__p_s_p_s[n * 9 + 2] = SIMINT_FMADD( aoq_PQ[2], PRIM_INT__p_s_s_s[(n+1) * 3 + 0], PRIM_INT__p_s_p_s[n * 9 + 2]);

                        PRIM_INT__p_s_p_s[n * 9 + 3] = SIMINT_MUL(Q_PA[0], PRIM_INT__p_s_s_s[n * 3 + 1]);
                        PRIM_INT__p_s_p_s[n * 9 + 3] = SIMINT_FMADD( aoq_PQ[0], PRIM_INT__p_s_s_s[(n+1) * 3 + 1], PRIM_INT__p_s_p_s[n * 9 + 3]);

                        PRIM_INT__p_s_p_s[n * 9 + 4] = SIMINT_MUL(Q_PA[1], PRIM_INT__p_s_s_s[n * 3 + 1]);
                        PRIM_INT__p_s_p_s[n * 9 + 4] = SIMINT_FMADD( aoq_PQ[1], PRIM_INT__p_s_s_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(Q_PA[2], PRIM_INT__p_s_s_s[n * 3 + 1]);
                        PRIM_INT__p_s_p_s[n * 9 + 5] = SIMINT_FMADD( aoq_PQ[2], PRIM_INT__p_s_s_s[(n+1) * 3 + 1], PRIM_INT__p_s_p_s[n * 9 + 5]);

                        PRIM_INT__p_s_p_s[n * 9 + 6] = SIMINT_MUL(Q_PA[0], PRIM_INT__p_s_s_s[n * 3 + 2]);
                        PRIM_INT__p_s_p_s[n * 9 + 6] = SIMINT_FMADD( aoq_PQ[0], PRIM_INT__p_s_s_s[(n+1) * 3 + 2], PRIM_INT__p_s_p_s[n * 9 + 6]);

                        PRIM_INT__p_s_p_s[n * 9 + 7] = SIMINT_MUL(Q_PA[1], PRIM_INT__p_s_s_s[n * 3 + 2]);
                        PRIM_INT__p_s_p_s[n * 9 + 7] = SIMINT_FMADD( aoq_PQ[1], PRIM_INT__p_s_s_s[(n+1) * 3 + 2], PRIM_INT__p_s_p_s[n * 9 + 7]);

                        PRIM_INT__p_s_p_s[n * 9 + 8] = SIMINT_MUL(Q_PA[2], PRIM_INT__p_s_s_s[n * 3 + 2]);
                        PRIM_INT__p_s_p_s[n * 9 + 8] = SIMINT_FMADD( aoq_PQ[2], PRIM_INT__p_s_s_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_K_d_s_d_s(
                            PRIM_INT__d_s_d_s,
                            PRIM_INT__d_s_p_s,
                            PRIM_INT__d_s_s_s,
                            PRIM_INT__p_s_p_s,
                            Q_PA,
                            a_over_q,
                            aoq_PQ,
                            one_over_2pq,
                            one_over_2q,
                            11);


                    ostei_general_vrr_K(3, 0, 3, 0, 10,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__f_s_d_s, PRIM_INT__f_s_p_s, NULL, PRIM_INT__d_s_d_s, NULL, PRIM_INT__f_s_f_s);


                    ostei_general_vrr_K(4, 0, 4, 0, 9,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__g_s_f_s, PRIM_INT__g_s_d_s, NULL, PRIM_INT__f_s_f_s, NULL, PRIM_INT__g_s_g_s);


                    ostei_general_vrr_K(5, 0, 5, 0, 8,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__h_s_g_s, PRIM_INT__h_s_f_s, NULL, PRIM_INT__g_s_g_s, NULL, PRIM_INT__h_s_h_s);


                    ostei_general_vrr_K(6, 0, 6, 0, 7,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__i_s_h_s, PRIM_INT__i_s_g_s, NULL, PRIM_INT__h_s_h_s, NULL, PRIM_INT__i_s_i_s);


                    ostei_general_vrr_K(7, 0, 7, 0, 6,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__k_s_i_s, PRIM_INT__k_s_h_s, NULL, PRIM_INT__i_s_i_s, NULL, PRIM_INT__k_s_k_s);


                    ostei_general_vrr1_I(8, 19,
                            one_over_2p, a_over_p, aop_PQ, P_PA,
                            PRIM_INT__k_s_s_s, PRIM_INT__i_s_s_s, PRIM_INT__l_s_s_s);


                    ostei_general_vrr_K(8, 0, 1, 0, 12,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__l_s_s_s, NULL, NULL, PRIM_INT__k_s_s_s, NULL, PRIM_INT__l_s_p_s);


                    ostei_general_vrr_K(8, 0, 2, 0, 11,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__l_s_p_s, PRIM_INT__l_s_s_s, NULL, PRIM_INT__k_s_p_s, NULL, PRIM_INT__l_s_d_s);


                    ostei_general_vrr_K(8, 0, 3, 0, 10,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__l_s_d_s, PRIM_INT__l_s_p_s, NULL, PRIM_INT__k_s_d_s, NULL, PRIM_INT__l_s_f_s);


                    ostei_general_vrr_K(8, 0, 4, 0, 9,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__l_s_f_s, PRIM_INT__l_s_d_s, NULL, PRIM_INT__k_s_f_s, NULL, PRIM_INT__l_s_g_s);


                    ostei_general_vrr_K(8, 0, 5, 0, 8,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__l_s_g_s, PRIM_INT__l_s_f_s, NULL, PRIM_INT__k_s_g_s, NULL, PRIM_INT__l_s_h_s);


                    ostei_general_vrr_K(8, 0, 6, 0, 7,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__l_s_h_s, PRIM_INT__l_s_g_s, NULL, PRIM_INT__k_s_h_s, NULL, PRIM_INT__l_s_i_s);



                    // Forming PRIM_INT__s_s_p_s[12 * 3];
                    for(n = 0; n < 12; ++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__p_s_d_s[11 * 18];
                    for(n = 0; n < 11; ++n)  // loop over orders of auxiliary function
                    {

                        PRIM_INT__p_s_d_s[n * 18 + 0] = SIMINT_MUL(Q_PA[0], PRIM_INT__p_s_p_s[n * 9 + 0]);
                        PRIM_INT__p_s_d_s[n * 18 + 0] = SIMINT_FMADD( aoq_PQ[0], PRIM_INT__p_s_p_s[(n+1) * 9 + 0], PRIM_INT__p_s_d_s[n * 18 + 0]);
                        PRIM_INT__p_s_d_s[n * 18 + 0] = SIMINT_FMADD( vrr_const_1_over_2q, SIMINT_FMADD(a_over_q, PRIM_INT__p_s_s_s[(n+1) * 3 + 0], PRIM_INT__p_s_s_s[n * 3 + 0]), PRIM_INT__p_s_d_s[n * 18 + 0]);
                        PRIM_INT__p_s_d_s[n * 18 + 0] = 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 + 0]);

                        PRIM_INT__p_s_d_s[n * 18 + 3] = SIMINT_MUL(Q_PA[1], PRIM_INT__p_s_p_s[n * 9 + 1]);
                        PRIM_INT__p_s_d_s[n * 18 + 3] = SIMINT_FMADD( aoq_PQ[1], PRIM_INT__p_s_p_s[(n+1) * 9 + 1], PRIM_INT__p_s_d_s[n * 18 + 3]);
                        PRIM_INT__p_s_d_s[n * 18 + 3] = SIMINT_FMADD( vrr_const_1_over_2q, SIMINT_FMADD(a_over_q, PRIM_INT__p_s_s_s[(n+1) * 3 + 0], PRIM_INT__p_s_s_s[n * 3 + 0]), PRIM_INT__p_s_d_s[n * 18 + 3]);

                        PRIM_INT__p_s_d_s[n * 18 + 5] = SIMINT_MUL(Q_PA[2], PRIM_INT__p_s_p_s[n * 9 + 2]);
                        PRIM_INT__p_s_d_s[n * 18 + 5] = SIMINT_FMADD( aoq_PQ[2], PRIM_INT__p_s_p_s[(n+1) * 9 + 2], PRIM_INT__p_s_d_s[n * 18 + 5]);
                        PRIM_INT__p_s_d_s[n * 18 + 5] = SIMINT_FMADD( vrr_const_1_over_2q, SIMINT_FMADD(a_over_q, PRIM_INT__p_s_s_s[(n+1) * 3 + 0], PRIM_INT__p_s_s_s[n * 3 + 0]), PRIM_INT__p_s_d_s[n * 18 + 5]);

                        PRIM_INT__p_s_d_s[n * 18 + 6] = SIMINT_MUL(Q_PA[0], PRIM_INT__p_s_p_s[n * 9 + 3]);
                        PRIM_INT__p_s_d_s[n * 18 + 6] = SIMINT_FMADD( aoq_PQ[0], PRIM_INT__p_s_p_s[(n+1) * 9 + 3], PRIM_INT__p_s_d_s[n * 18 + 6]);
                        PRIM_INT__p_s_d_s[n * 18 + 6] = SIMINT_FMADD( vrr_const_1_over_2q, SIMINT_FMADD(a_over_q, PRIM_INT__p_s_s_s[(n+1) * 3 + 1], PRIM_INT__p_s_s_s[n * 3 + 1]), PRIM_INT__p_s_d_s[n * 18 + 6]);

                        PRIM_INT__p_s_d_s[n * 18 + 9] = SIMINT_MUL(Q_PA[1], PRIM_INT__p_s_p_s[n * 9 + 4]);
                        PRIM_INT__p_s_d_s[n * 18 + 9] = SIMINT_FMADD( aoq_PQ[1], PRIM_INT__p_s_p_s[(n+1) * 9 + 4], PRIM_INT__p_s_d_s[n * 18 + 9]);
                        PRIM_INT__p_s_d_s[n * 18 + 9] = SIMINT_FMADD( vrr_const_1_over_2q, SIMINT_FMADD(a_over_q, PRIM_INT__p_s_s_s[(n+1) * 3 + 1], PRIM_INT__p_s_s_s[n * 3 + 1]), PRIM_INT__p_s_d_s[n * 18 + 9]);
                        PRIM_INT__p_s_d_s[n * 18 + 9] = 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 + 9]);

                        PRIM_INT__p_s_d_s[n * 18 + 11] = SIMINT_MUL(Q_PA[2], PRIM_INT__p_s_p_s[n * 9 + 5]);
                        PRIM_INT__p_s_d_s[n * 18 + 11] = SIMINT_FMADD( aoq_PQ[2], PRIM_INT__p_s_p_s[(n+1) * 9 + 5], PRIM_INT__p_s_d_s[n * 18 + 11]);
                        PRIM_INT__p_s_d_s[n * 18 + 11] = SIMINT_FMADD( vrr_const_1_over_2q, SIMINT_FMADD(a_over_q, PRIM_INT__p_s_s_s[(n+1) * 3 + 1], PRIM_INT__p_s_s_s[n * 3 + 1]), PRIM_INT__p_s_d_s[n * 18 + 11]);

                        PRIM_INT__p_s_d_s[n * 18 + 12] = SIMINT_MUL(Q_PA[0], PRIM_INT__p_s_p_s[n * 9 + 6]);
                        PRIM_INT__p_s_d_s[n * 18 + 12] = SIMINT_FMADD( aoq_PQ[0], PRIM_INT__p_s_p_s[(n+1) * 9 + 6], PRIM_INT__p_s_d_s[n * 18 + 12]);
                        PRIM_INT__p_s_d_s[n * 18 + 12] = SIMINT_FMADD( vrr_const_1_over_2q, SIMINT_FMADD(a_over_q, PRIM_INT__p_s_s_s[(n+1) * 3 + 2], PRIM_INT__p_s_s_s[n * 3 + 2]), PRIM_INT__p_s_d_s[n * 18 + 12]);

                        PRIM_INT__p_s_d_s[n * 18 + 15] = SIMINT_MUL(Q_PA[1], PRIM_INT__p_s_p_s[n * 9 + 7]);
                        PRIM_INT__p_s_d_s[n * 18 + 15] = SIMINT_FMADD( aoq_PQ[1], PRIM_INT__p_s_p_s[(n+1) * 9 + 7], PRIM_INT__p_s_d_s[n * 18 + 15]);
                        PRIM_INT__p_s_d_s[n * 18 + 15] = SIMINT_FMADD( vrr_const_1_over_2q, SIMINT_FMADD(a_over_q, PRIM_INT__p_s_s_s[(n+1) * 3 + 2], PRIM_INT__p_s_s_s[n * 3 + 2]), PRIM_INT__p_s_d_s[n * 18 + 15]);

                        PRIM_INT__p_s_d_s[n * 18 + 17] = SIMINT_MUL(Q_PA[2], PRIM_INT__p_s_p_s[n * 9 + 8]);
                        PRIM_INT__p_s_d_s[n * 18 + 17] = SIMINT_FMADD( aoq_PQ[2], PRIM_INT__p_s_p_s[(n+1) * 9 + 8], PRIM_INT__p_s_d_s[n * 18 + 17]);
                        PRIM_INT__p_s_d_s[n * 18 + 17] = SIMINT_FMADD( vrr_const_1_over_2q, SIMINT_FMADD(a_over_q, PRIM_INT__p_s_s_s[(n+1) * 3 + 2], PRIM_INT__p_s_s_s[n * 3 + 2]), PRIM_INT__p_s_d_s[n * 18 + 17]);
                        PRIM_INT__p_s_d_s[n * 18 + 17] = 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 + 17]);

                    }


                    VRR_K_d_s_f_s(
                            PRIM_INT__d_s_f_s,
                            PRIM_INT__d_s_d_s,
                            PRIM_INT__d_s_p_s,
                            PRIM_INT__p_s_d_s,
                            Q_PA,
                            a_over_q,
                            aoq_PQ,
                            one_over_2pq,
                            one_over_2q,
                            10);


                    ostei_general_vrr_K(3, 0, 4, 0, 9,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__f_s_f_s, PRIM_INT__f_s_d_s, NULL, PRIM_INT__d_s_f_s, NULL, PRIM_INT__f_s_g_s);


                    ostei_general_vrr_K(4, 0, 5, 0, 8,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__g_s_g_s, PRIM_INT__g_s_f_s, NULL, PRIM_INT__f_s_g_s, NULL, PRIM_INT__g_s_h_s);


                    ostei_general_vrr_K(5, 0, 6, 0, 7,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__h_s_h_s, PRIM_INT__h_s_g_s, NULL, PRIM_INT__g_s_h_s, NULL, PRIM_INT__h_s_i_s);


                    ostei_general_vrr_K(6, 0, 7, 0, 6,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__i_s_i_s, PRIM_INT__i_s_h_s, NULL, PRIM_INT__h_s_i_s, NULL, PRIM_INT__i_s_k_s);


                    ostei_general_vrr_K(7, 0, 8, 0, 5,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__k_s_k_s, PRIM_INT__k_s_i_s, NULL, PRIM_INT__i_s_k_s, NULL, PRIM_INT__k_s_l_s);


                    ostei_general_vrr_K(8, 0, 7, 0, 6,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__l_s_i_s, PRIM_INT__l_s_h_s, NULL, PRIM_INT__k_s_i_s, NULL, PRIM_INT__l_s_k_s);


                    ostei_general_vrr1_I(9, 18,
                            one_over_2p, a_over_p, aop_PQ, P_PA,
                            PRIM_INT__l_s_s_s, PRIM_INT__k_s_s_s, PRIM_INT__m_s_s_s);


                    ostei_general_vrr_K(9, 0, 1, 0, 12,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__m_s_s_s, NULL, NULL, PRIM_INT__l_s_s_s, NULL, PRIM_INT__m_s_p_s);


                    ostei_general_vrr_K(9, 0, 2, 0, 11,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__m_s_p_s, PRIM_INT__m_s_s_s, NULL, PRIM_INT__l_s_p_s, NULL, PRIM_INT__m_s_d_s);


                    ostei_general_vrr_K(9, 0, 3, 0, 10,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__m_s_d_s, PRIM_INT__m_s_p_s, NULL, PRIM_INT__l_s_d_s, NULL, PRIM_INT__m_s_f_s);


                    ostei_general_vrr_K(9, 0, 4, 0, 9,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__m_s_f_s, PRIM_INT__m_s_d_s, NULL, PRIM_INT__l_s_f_s, NULL, PRIM_INT__m_s_g_s);


                    ostei_general_vrr_K(9, 0, 5, 0, 8,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__m_s_g_s, PRIM_INT__m_s_f_s, NULL, PRIM_INT__l_s_g_s, NULL, PRIM_INT__m_s_h_s);


                    ostei_general_vrr_K(9, 0, 6, 0, 7,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__m_s_h_s, PRIM_INT__m_s_g_s, NULL, PRIM_INT__l_s_h_s, NULL, PRIM_INT__m_s_i_s);



                    // Forming PRIM_INT__s_s_d_s[11 * 6];
                    for(n = 0; n < 11; ++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 + 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 + 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]);

                    }


                    VRR_K_p_s_f_s(
                            PRIM_INT__p_s_f_s,
                            PRIM_INT__p_s_d_s,
                            PRIM_INT__p_s_p_s,
                            PRIM_INT__s_s_d_s,
                            Q_PA,
                            a_over_q,
                            aoq_PQ,
                            one_over_2pq,
                            one_over_2q,
                            10);


                    ostei_general_vrr_K(2, 0, 4, 0, 9,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__d_s_f_s, PRIM_INT__d_s_d_s, NULL, PRIM_INT__p_s_f_s, NULL, PRIM_INT__d_s_g_s);


                    ostei_general_vrr_K(3, 0, 5, 0, 8,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__f_s_g_s, PRIM_INT__f_s_f_s, NULL, PRIM_INT__d_s_g_s, NULL, PRIM_INT__f_s_h_s);


                    ostei_general_vrr_K(4, 0, 6, 0, 7,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__g_s_h_s, PRIM_INT__g_s_g_s, NULL, PRIM_INT__f_s_h_s, NULL, PRIM_INT__g_s_i_s);


                    ostei_general_vrr_K(5, 0, 7, 0, 6,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__h_s_i_s, PRIM_INT__h_s_h_s, NULL, PRIM_INT__g_s_i_s, NULL, PRIM_INT__h_s_k_s);


                    ostei_general_vrr_K(6, 0, 8, 0, 5,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__i_s_k_s, PRIM_INT__i_s_i_s, NULL, PRIM_INT__h_s_k_s, NULL, PRIM_INT__i_s_l_s);


                    ostei_general_vrr_K(7, 0, 9, 0, 4,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__k_s_l_s, PRIM_INT__k_s_k_s, NULL, PRIM_INT__i_s_l_s, NULL, PRIM_INT__k_s_m_s);


                    ostei_general_vrr_K(8, 0, 8, 0, 5,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__l_s_k_s, PRIM_INT__l_s_i_s, NULL, PRIM_INT__k_s_k_s, NULL, PRIM_INT__l_s_l_s);


                    ostei_general_vrr_K(9, 0, 7, 0, 6,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__m_s_i_s, PRIM_INT__m_s_h_s, NULL, PRIM_INT__l_s_i_s, NULL, PRIM_INT__m_s_k_s);


                    ostei_general_vrr1_I(10, 17,
                            one_over_2p, a_over_p, aop_PQ, P_PA,
                            PRIM_INT__m_s_s_s, PRIM_INT__l_s_s_s, PRIM_INT__n_s_s_s);


                    ostei_general_vrr_K(10, 0, 1, 0, 12,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__n_s_s_s, NULL, NULL, PRIM_INT__m_s_s_s, NULL, PRIM_INT__n_s_p_s);


                    ostei_general_vrr_K(10, 0, 2, 0, 11,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__n_s_p_s, PRIM_INT__n_s_s_s, NULL, PRIM_INT__m_s_p_s, NULL, PRIM_INT__n_s_d_s);


                    ostei_general_vrr_K(10, 0, 3, 0, 10,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__n_s_d_s, PRIM_INT__n_s_p_s, NULL, PRIM_INT__m_s_d_s, NULL, PRIM_INT__n_s_f_s);


                    ostei_general_vrr_K(10, 0, 4, 0, 9,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__n_s_f_s, PRIM_INT__n_s_d_s, NULL, PRIM_INT__m_s_f_s, NULL, PRIM_INT__n_s_g_s);


                    ostei_general_vrr_K(10, 0, 5, 0, 8,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__n_s_g_s, PRIM_INT__n_s_f_s, NULL, PRIM_INT__m_s_g_s, NULL, PRIM_INT__n_s_h_s);


                    ostei_general_vrr_K(10, 0, 6, 0, 7,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__n_s_h_s, PRIM_INT__n_s_g_s, NULL, PRIM_INT__m_s_h_s, NULL, PRIM_INT__n_s_i_s);



                    // Forming PRIM_INT__s_s_f_s[10 * 10];
                    for(n = 0; n < 10; ++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 + 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 + 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_p_s_g_s(
                            PRIM_INT__p_s_g_s,
                            PRIM_INT__p_s_f_s,
                            PRIM_INT__p_s_d_s,
                            PRIM_INT__s_s_f_s,
                            Q_PA,
                            a_over_q,
                            aoq_PQ,
                            one_over_2pq,
                            one_over_2q,
                            9);


                    ostei_general_vrr_K(2, 0, 5, 0, 8,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__d_s_g_s, PRIM_INT__d_s_f_s, NULL, PRIM_INT__p_s_g_s, NULL, PRIM_INT__d_s_h_s);


                    ostei_general_vrr_K(3, 0, 6, 0, 7,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__f_s_h_s, PRIM_INT__f_s_g_s, NULL, PRIM_INT__d_s_h_s, NULL, PRIM_INT__f_s_i_s);


                    ostei_general_vrr_K(4, 0, 7, 0, 6,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__g_s_i_s, PRIM_INT__g_s_h_s, NULL, PRIM_INT__f_s_i_s, NULL, PRIM_INT__g_s_k_s);


                    ostei_general_vrr_K(5, 0, 8, 0, 5,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__h_s_k_s, PRIM_INT__h_s_i_s, NULL, PRIM_INT__g_s_k_s, NULL, PRIM_INT__h_s_l_s);


                    ostei_general_vrr_K(6, 0, 9, 0, 4,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__i_s_l_s, PRIM_INT__i_s_k_s, NULL, PRIM_INT__h_s_l_s, NULL, PRIM_INT__i_s_m_s);


                    ostei_general_vrr_K(7, 0, 10, 0, 3,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__k_s_m_s, PRIM_INT__k_s_l_s, NULL, PRIM_INT__i_s_m_s, NULL, PRIM_INT__k_s_n_s);


                    ostei_general_vrr_K(8, 0, 9, 0, 4,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__l_s_l_s, PRIM_INT__l_s_k_s, NULL, PRIM_INT__k_s_l_s, NULL, PRIM_INT__l_s_m_s);


                    ostei_general_vrr_K(9, 0, 8, 0, 5,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__m_s_k_s, PRIM_INT__m_s_i_s, NULL, PRIM_INT__l_s_k_s, NULL, PRIM_INT__m_s_l_s);


                    ostei_general_vrr_K(10, 0, 7, 0, 6,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__n_s_i_s, PRIM_INT__n_s_h_s, NULL, PRIM_INT__m_s_i_s, NULL, PRIM_INT__n_s_k_s);


                    ostei_general_vrr1_I(11, 16,
                            one_over_2p, a_over_p, aop_PQ, P_PA,
                            PRIM_INT__n_s_s_s, PRIM_INT__m_s_s_s, PRIM_INT__o_s_s_s);


                    ostei_general_vrr_K(11, 0, 1, 0, 12,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__o_s_s_s, NULL, NULL, PRIM_INT__n_s_s_s, NULL, PRIM_INT__o_s_p_s);


                    ostei_general_vrr_K(11, 0, 2, 0, 11,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__o_s_p_s, PRIM_INT__o_s_s_s, NULL, PRIM_INT__n_s_p_s, NULL, PRIM_INT__o_s_d_s);


                    ostei_general_vrr_K(11, 0, 3, 0, 10,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__o_s_d_s, PRIM_INT__o_s_p_s, NULL, PRIM_INT__n_s_d_s, NULL, PRIM_INT__o_s_f_s);


                    ostei_general_vrr_K(11, 0, 4, 0, 9,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__o_s_f_s, PRIM_INT__o_s_d_s, NULL, PRIM_INT__n_s_f_s, NULL, PRIM_INT__o_s_g_s);


                    ostei_general_vrr_K(11, 0, 5, 0, 8,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__o_s_g_s, PRIM_INT__o_s_f_s, NULL, PRIM_INT__n_s_g_s, NULL, PRIM_INT__o_s_h_s);


                    ostei_general_vrr_K(11, 0, 6, 0, 7,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__o_s_h_s, PRIM_INT__o_s_g_s, NULL, PRIM_INT__n_s_h_s, NULL, PRIM_INT__o_s_i_s);


                    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,
                            9);


                    ostei_general_vrr_K(1, 0, 5, 0, 8,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__p_s_g_s, PRIM_INT__p_s_f_s, NULL, PRIM_INT__s_s_g_s, NULL, PRIM_INT__p_s_h_s);


                    ostei_general_vrr_K(2, 0, 6, 0, 7,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__d_s_h_s, PRIM_INT__d_s_g_s, NULL, PRIM_INT__p_s_h_s, NULL, PRIM_INT__d_s_i_s);


                    ostei_general_vrr_K(3, 0, 7, 0, 6,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__f_s_i_s, PRIM_INT__f_s_h_s, NULL, PRIM_INT__d_s_i_s, NULL, PRIM_INT__f_s_k_s);


                    ostei_general_vrr_K(4, 0, 8, 0, 5,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__g_s_k_s, PRIM_INT__g_s_i_s, NULL, PRIM_INT__f_s_k_s, NULL, PRIM_INT__g_s_l_s);


                    ostei_general_vrr_K(5, 0, 9, 0, 4,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__h_s_l_s, PRIM_INT__h_s_k_s, NULL, PRIM_INT__g_s_l_s, NULL, PRIM_INT__h_s_m_s);


                    ostei_general_vrr_K(6, 0, 10, 0, 3,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__i_s_m_s, PRIM_INT__i_s_l_s, NULL, PRIM_INT__h_s_m_s, NULL, PRIM_INT__i_s_n_s);


                    ostei_general_vrr_K(7, 0, 11, 0, 2,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__k_s_n_s, PRIM_INT__k_s_m_s, NULL, PRIM_INT__i_s_n_s, NULL, PRIM_INT__k_s_o_s);


                    ostei_general_vrr_K(8, 0, 10, 0, 3,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__l_s_m_s, PRIM_INT__l_s_l_s, NULL, PRIM_INT__k_s_m_s, NULL, PRIM_INT__l_s_n_s);


                    ostei_general_vrr_K(9, 0, 9, 0, 4,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__m_s_l_s, PRIM_INT__m_s_k_s, NULL, PRIM_INT__l_s_l_s, NULL, PRIM_INT__m_s_m_s);


                    ostei_general_vrr_K(10, 0, 8, 0, 5,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__n_s_k_s, PRIM_INT__n_s_i_s, NULL, PRIM_INT__m_s_k_s, NULL, PRIM_INT__n_s_l_s);


                    ostei_general_vrr_K(11, 0, 7, 0, 6,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__o_s_i_s, PRIM_INT__o_s_h_s, NULL, PRIM_INT__n_s_i_s, NULL, PRIM_INT__o_s_k_s);


                    ostei_general_vrr1_I(12, 15,
                            one_over_2p, a_over_p, aop_PQ, P_PA,
                            PRIM_INT__o_s_s_s, PRIM_INT__n_s_s_s, PRIM_INT__q_s_s_s);


                    ostei_general_vrr_K(12, 0, 1, 0, 12,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__q_s_s_s, NULL, NULL, PRIM_INT__o_s_s_s, NULL, PRIM_INT__q_s_p_s);


                    ostei_general_vrr_K(12, 0, 2, 0, 11,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__q_s_p_s, PRIM_INT__q_s_s_s, NULL, PRIM_INT__o_s_p_s, NULL, PRIM_INT__q_s_d_s);


                    ostei_general_vrr_K(12, 0, 3, 0, 10,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__q_s_d_s, PRIM_INT__q_s_p_s, NULL, PRIM_INT__o_s_d_s, NULL, PRIM_INT__q_s_f_s);


                    ostei_general_vrr_K(12, 0, 4, 0, 9,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__q_s_f_s, PRIM_INT__q_s_d_s, NULL, PRIM_INT__o_s_f_s, NULL, PRIM_INT__q_s_g_s);


                    ostei_general_vrr_K(12, 0, 5, 0, 8,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__q_s_g_s, PRIM_INT__q_s_f_s, NULL, PRIM_INT__o_s_g_s, NULL, PRIM_INT__q_s_h_s);


                    ostei_general_vrr_K(12, 0, 6, 0, 7,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__q_s_h_s, PRIM_INT__q_s_g_s, NULL, PRIM_INT__o_s_h_s, NULL, PRIM_INT__q_s_i_s);


                    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,
                            8);


                    ostei_general_vrr_K(1, 0, 6, 0, 7,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__p_s_h_s, PRIM_INT__p_s_g_s, NULL, PRIM_INT__s_s_h_s, NULL, PRIM_INT__p_s_i_s);


                    ostei_general_vrr_K(2, 0, 7, 0, 6,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__d_s_i_s, PRIM_INT__d_s_h_s, NULL, PRIM_INT__p_s_i_s, NULL, PRIM_INT__d_s_k_s);


                    ostei_general_vrr_K(3, 0, 8, 0, 5,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__f_s_k_s, PRIM_INT__f_s_i_s, NULL, PRIM_INT__d_s_k_s, NULL, PRIM_INT__f_s_l_s);


                    ostei_general_vrr_K(4, 0, 9, 0, 4,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__g_s_l_s, PRIM_INT__g_s_k_s, NULL, PRIM_INT__f_s_l_s, NULL, PRIM_INT__g_s_m_s);


                    ostei_general_vrr_K(5, 0, 10, 0, 3,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__h_s_m_s, PRIM_INT__h_s_l_s, NULL, PRIM_INT__g_s_m_s, NULL, PRIM_INT__h_s_n_s);


                    ostei_general_vrr_K(6, 0, 11, 0, 2,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__i_s_n_s, PRIM_INT__i_s_m_s, NULL, PRIM_INT__h_s_n_s, NULL, PRIM_INT__i_s_o_s);


                    ostei_general_vrr_K(7, 0, 12, 0, 1,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__k_s_o_s, PRIM_INT__k_s_n_s, NULL, PRIM_INT__i_s_o_s, NULL, PRIM_INT__k_s_q_s);


                    ostei_general_vrr_K(8, 0, 11, 0, 2,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__l_s_n_s, PRIM_INT__l_s_m_s, NULL, PRIM_INT__k_s_n_s, NULL, PRIM_INT__l_s_o_s);


                    ostei_general_vrr_K(9, 0, 10, 0, 3,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__m_s_m_s, PRIM_INT__m_s_l_s, NULL, PRIM_INT__l_s_m_s, NULL, PRIM_INT__m_s_n_s);


                    ostei_general_vrr_K(10, 0, 9, 0, 4,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__n_s_l_s, PRIM_INT__n_s_k_s, NULL, PRIM_INT__m_s_l_s, NULL, PRIM_INT__n_s_m_s);


                    ostei_general_vrr_K(11, 0, 8, 0, 5,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__o_s_k_s, PRIM_INT__o_s_i_s, NULL, PRIM_INT__n_s_k_s, NULL, PRIM_INT__o_s_l_s);


                    ostei_general_vrr_K(12, 0, 7, 0, 6,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__q_s_i_s, PRIM_INT__q_s_h_s, NULL, PRIM_INT__o_s_i_s, NULL, PRIM_INT__q_s_k_s);


                    ostei_general_vrr1_I(13, 14,
                            one_over_2p, a_over_p, aop_PQ, P_PA,
                            PRIM_INT__q_s_s_s, PRIM_INT__o_s_s_s, PRIM_INT__r_s_s_s);


                    ostei_general_vrr_K(13, 0, 1, 0, 12,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__r_s_s_s, NULL, NULL, PRIM_INT__q_s_s_s, NULL, PRIM_INT__r_s_p_s);


                    ostei_general_vrr_K(13, 0, 2, 0, 11,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__r_s_p_s, PRIM_INT__r_s_s_s, NULL, PRIM_INT__q_s_p_s, NULL, PRIM_INT__r_s_d_s);


                    ostei_general_vrr_K(13, 0, 3, 0, 10,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__r_s_d_s, PRIM_INT__r_s_p_s, NULL, PRIM_INT__q_s_d_s, NULL, PRIM_INT__r_s_f_s);


                    ostei_general_vrr_K(13, 0, 4, 0, 9,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__r_s_f_s, PRIM_INT__r_s_d_s, NULL, PRIM_INT__q_s_f_s, NULL, PRIM_INT__r_s_g_s);


                    ostei_general_vrr_K(13, 0, 5, 0, 8,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__r_s_g_s, PRIM_INT__r_s_f_s, NULL, PRIM_INT__q_s_g_s, NULL, PRIM_INT__r_s_h_s);


                    ostei_general_vrr_K(13, 0, 6, 0, 7,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__r_s_h_s, PRIM_INT__r_s_g_s, NULL, PRIM_INT__q_s_h_s, NULL, PRIM_INT__r_s_i_s);


                    ostei_general_vrr_K(8, 0, 12, 0, 1,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__l_s_o_s, PRIM_INT__l_s_n_s, NULL, PRIM_INT__k_s_o_s, NULL, PRIM_INT__l_s_q_s);


                    ostei_general_vrr_K(9, 0, 11, 0, 2,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__m_s_n_s, PRIM_INT__m_s_m_s, NULL, PRIM_INT__l_s_n_s, NULL, PRIM_INT__m_s_o_s);


                    ostei_general_vrr_K(10, 0, 10, 0, 3,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__n_s_m_s, PRIM_INT__n_s_l_s, NULL, PRIM_INT__m_s_m_s, NULL, PRIM_INT__n_s_n_s);


                    ostei_general_vrr_K(11, 0, 9, 0, 4,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__o_s_l_s, PRIM_INT__o_s_k_s, NULL, PRIM_INT__n_s_l_s, NULL, PRIM_INT__o_s_m_s);


                    ostei_general_vrr_K(12, 0, 8, 0, 5,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__q_s_k_s, PRIM_INT__q_s_i_s, NULL, PRIM_INT__o_s_k_s, NULL, PRIM_INT__q_s_l_s);


                    ostei_general_vrr_K(13, 0, 7, 0, 6,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__r_s_i_s, PRIM_INT__r_s_h_s, NULL, PRIM_INT__q_s_i_s, NULL, PRIM_INT__r_s_k_s);


                    ostei_general_vrr1_I(14, 13,
                            one_over_2p, a_over_p, aop_PQ, P_PA,
                            PRIM_INT__r_s_s_s, PRIM_INT__q_s_s_s, PRIM_INT__t_s_s_s);


                    ostei_general_vrr_K(14, 0, 1, 0, 12,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__t_s_s_s, NULL, NULL, PRIM_INT__r_s_s_s, NULL, PRIM_INT__t_s_p_s);


                    ostei_general_vrr_K(14, 0, 2, 0, 11,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__t_s_p_s, PRIM_INT__t_s_s_s, NULL, PRIM_INT__r_s_p_s, NULL, PRIM_INT__t_s_d_s);


                    ostei_general_vrr_K(14, 0, 3, 0, 10,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__t_s_d_s, PRIM_INT__t_s_p_s, NULL, PRIM_INT__r_s_d_s, NULL, PRIM_INT__t_s_f_s);


                    ostei_general_vrr_K(14, 0, 4, 0, 9,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__t_s_f_s, PRIM_INT__t_s_d_s, NULL, PRIM_INT__r_s_f_s, NULL, PRIM_INT__t_s_g_s);


                    ostei_general_vrr_K(14, 0, 5, 0, 8,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__t_s_g_s, PRIM_INT__t_s_f_s, NULL, PRIM_INT__r_s_g_s, NULL, PRIM_INT__t_s_h_s);


                    ostei_general_vrr_K(14, 0, 6, 0, 7,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__t_s_h_s, PRIM_INT__t_s_g_s, NULL, PRIM_INT__r_s_h_s, NULL, PRIM_INT__t_s_i_s);


                    ostei_general_vrr_K(9, 0, 12, 0, 1,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__m_s_o_s, PRIM_INT__m_s_n_s, NULL, PRIM_INT__l_s_o_s, NULL, PRIM_INT__m_s_q_s);


                    ostei_general_vrr_K(10, 0, 11, 0, 2,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__n_s_n_s, PRIM_INT__n_s_m_s, NULL, PRIM_INT__m_s_n_s, NULL, PRIM_INT__n_s_o_s);


                    ostei_general_vrr_K(11, 0, 10, 0, 3,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__o_s_m_s, PRIM_INT__o_s_l_s, NULL, PRIM_INT__n_s_m_s, NULL, PRIM_INT__o_s_n_s);


                    ostei_general_vrr_K(12, 0, 9, 0, 4,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__q_s_l_s, PRIM_INT__q_s_k_s, NULL, PRIM_INT__o_s_l_s, NULL, PRIM_INT__q_s_m_s);


                    ostei_general_vrr_K(13, 0, 8, 0, 5,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__r_s_k_s, PRIM_INT__r_s_i_s, NULL, PRIM_INT__q_s_k_s, NULL, PRIM_INT__r_s_l_s);


                    ostei_general_vrr_K(14, 0, 7, 0, 6,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__t_s_i_s, PRIM_INT__t_s_h_s, NULL, PRIM_INT__r_s_i_s, NULL, PRIM_INT__t_s_k_s);


                    ostei_general_vrr_K(10, 0, 12, 0, 1,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__n_s_o_s, PRIM_INT__n_s_n_s, NULL, PRIM_INT__m_s_o_s, NULL, PRIM_INT__n_s_q_s);


                    ostei_general_vrr_K(11, 0, 11, 0, 2,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__o_s_n_s, PRIM_INT__o_s_m_s, NULL, PRIM_INT__n_s_n_s, NULL, PRIM_INT__o_s_o_s);


                    ostei_general_vrr_K(12, 0, 10, 0, 3,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__q_s_m_s, PRIM_INT__q_s_l_s, NULL, PRIM_INT__o_s_m_s, NULL, PRIM_INT__q_s_n_s);


                    ostei_general_vrr_K(13, 0, 9, 0, 4,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__r_s_l_s, PRIM_INT__r_s_k_s, NULL, PRIM_INT__q_s_l_s, NULL, PRIM_INT__r_s_m_s);


                    ostei_general_vrr_K(14, 0, 8, 0, 5,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__t_s_k_s, PRIM_INT__t_s_i_s, NULL, PRIM_INT__r_s_k_s, NULL, PRIM_INT__t_s_l_s);


                    ostei_general_vrr_K(11, 0, 12, 0, 1,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__o_s_o_s, PRIM_INT__o_s_n_s, NULL, PRIM_INT__n_s_o_s, NULL, PRIM_INT__o_s_q_s);


                    ostei_general_vrr_K(12, 0, 11, 0, 2,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__q_s_n_s, PRIM_INT__q_s_m_s, NULL, PRIM_INT__o_s_n_s, NULL, PRIM_INT__q_s_o_s);


                    ostei_general_vrr_K(13, 0, 10, 0, 3,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__r_s_m_s, PRIM_INT__r_s_l_s, NULL, PRIM_INT__q_s_m_s, NULL, PRIM_INT__r_s_n_s);


                    ostei_general_vrr_K(14, 0, 9, 0, 4,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__t_s_l_s, PRIM_INT__t_s_k_s, NULL, PRIM_INT__r_s_l_s, NULL, PRIM_INT__t_s_m_s);


                    ostei_general_vrr_K(12, 0, 12, 0, 1,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__q_s_o_s, PRIM_INT__q_s_n_s, NULL, PRIM_INT__o_s_o_s, NULL, PRIM_INT__q_s_q_s);


                    ostei_general_vrr_K(13, 0, 11, 0, 2,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__r_s_n_s, PRIM_INT__r_s_m_s, NULL, PRIM_INT__q_s_n_s, NULL, PRIM_INT__r_s_o_s);


                    ostei_general_vrr_K(14, 0, 10, 0, 3,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__t_s_m_s, PRIM_INT__t_s_l_s, NULL, PRIM_INT__r_s_m_s, NULL, PRIM_INT__t_s_n_s);


                    ostei_general_vrr_K(13, 0, 12, 0, 1,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__r_s_o_s, PRIM_INT__r_s_n_s, NULL, PRIM_INT__q_s_o_s, NULL, PRIM_INT__r_s_q_s);


                    ostei_general_vrr_K(14, 0, 11, 0, 2,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__t_s_n_s, PRIM_INT__t_s_m_s, NULL, PRIM_INT__r_s_n_s, NULL, PRIM_INT__t_s_o_s);


                    ostei_general_vrr_K(14, 0, 12, 0, 1,
                            one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
                            PRIM_INT__t_s_o_s, PRIM_INT__t_s_n_s, NULL, PRIM_INT__r_s_o_s, NULL, PRIM_INT__t_s_q_s);




                    ////////////////////////////////////
                    // Accumulate contracted integrals
                    ////////////////////////////////////
                    if(lastoffset == 0)
                    {
                        contract_all(1008, PRIM_INT__k_s_i_s, PRIM_PTR_INT__k_s_i_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(1260, PRIM_INT__l_s_i_s, PRIM_PTR_INT__l_s_i_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(1540, PRIM_INT__m_s_i_s, PRIM_PTR_INT__m_s_i_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(1848, PRIM_INT__n_s_i_s, PRIM_PTR_INT__n_s_i_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(2184, PRIM_INT__o_s_i_s, PRIM_PTR_INT__o_s_i_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(2548, PRIM_INT__q_s_i_s, PRIM_PTR_INT__q_s_i_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(2940, PRIM_INT__r_s_i_s, PRIM_PTR_INT__r_s_i_s);
                        contract_all(3780, PRIM_INT__r_s_k_s, PRIM_PTR_INT__r_s_k_s);
                        contract_all(4725, PRIM_INT__r_s_l_s, PRIM_PTR_INT__r_s_l_s);
                        contract_all(5775, PRIM_INT__r_s_m_s, PRIM_PTR_INT__r_s_m_s);
                        contract_all(6930, PRIM_INT__r_s_n_s, PRIM_PTR_INT__r_s_n_s);
                        contract_all(8190, PRIM_INT__r_s_o_s, PRIM_PTR_INT__r_s_o_s);
                        contract_all(9555, PRIM_INT__r_s_q_s, PRIM_PTR_INT__r_s_q_s);
                        contract_all(3360, PRIM_INT__t_s_i_s, PRIM_PTR_INT__t_s_i_s);
                        contract_all(4320, PRIM_INT__t_s_k_s, PRIM_PTR_INT__t_s_k_s);
                        contract_all(5400, PRIM_INT__t_s_l_s, PRIM_PTR_INT__t_s_l_s);
                        contract_all(6600, PRIM_INT__t_s_m_s, PRIM_PTR_INT__t_s_m_s);
                        contract_all(7920, PRIM_INT__t_s_n_s, PRIM_PTR_INT__t_s_n_s);
                        contract_all(9360, PRIM_INT__t_s_o_s, PRIM_PTR_INT__t_s_o_s);
                        contract_all(10920, PRIM_INT__t_s_q_s, PRIM_PTR_INT__t_s_q_s);
                    }
                    else
                    {
                        contract(1008, shelloffsets, PRIM_INT__k_s_i_s, PRIM_PTR_INT__k_s_i_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(1260, shelloffsets, PRIM_INT__l_s_i_s, PRIM_PTR_INT__l_s_i_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(1540, shelloffsets, PRIM_INT__m_s_i_s, PRIM_PTR_INT__m_s_i_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(1848, shelloffsets, PRIM_INT__n_s_i_s, PRIM_PTR_INT__n_s_i_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(2184, shelloffsets, PRIM_INT__o_s_i_s, PRIM_PTR_INT__o_s_i_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(2548, shelloffsets, PRIM_INT__q_s_i_s, PRIM_PTR_INT__q_s_i_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(2940, shelloffsets, PRIM_INT__r_s_i_s, PRIM_PTR_INT__r_s_i_s);
                        contract(3780, shelloffsets, PRIM_INT__r_s_k_s, PRIM_PTR_INT__r_s_k_s);
                        contract(4725, shelloffsets, PRIM_INT__r_s_l_s, PRIM_PTR_INT__r_s_l_s);
                        contract(5775, shelloffsets, PRIM_INT__r_s_m_s, PRIM_PTR_INT__r_s_m_s);
                        contract(6930, shelloffsets, PRIM_INT__r_s_n_s, PRIM_PTR_INT__r_s_n_s);
                        contract(8190, shelloffsets, PRIM_INT__r_s_o_s, PRIM_PTR_INT__r_s_o_s);
                        contract(9555, shelloffsets, PRIM_INT__r_s_q_s, PRIM_PTR_INT__r_s_q_s);
                        contract(3360, shelloffsets, PRIM_INT__t_s_i_s, PRIM_PTR_INT__t_s_i_s);
                        contract(4320, shelloffsets, PRIM_INT__t_s_k_s, PRIM_PTR_INT__t_s_k_s);
                        contract(5400, shelloffsets, PRIM_INT__t_s_l_s, PRIM_PTR_INT__t_s_l_s);
                        contract(6600, shelloffsets, PRIM_INT__t_s_m_s, PRIM_PTR_INT__t_s_m_s);
                        contract(7920, shelloffsets, PRIM_INT__t_s_n_s, PRIM_PTR_INT__t_s_n_s);
                        contract(9360, shelloffsets, PRIM_INT__t_s_o_s, PRIM_PTR_INT__t_s_o_s);
                        contract(10920, shelloffsets, PRIM_INT__t_s_q_s, PRIM_PTR_INT__t_s_q_s);
                        PRIM_PTR_INT__k_s_i_s += lastoffset*1008;
                        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__l_s_i_s += lastoffset*1260;
                        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__m_s_i_s += lastoffset*1540;
                        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__n_s_i_s += lastoffset*1848;
                        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__o_s_i_s += lastoffset*2184;
                        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__q_s_i_s += lastoffset*2548;
                        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__r_s_i_s += lastoffset*2940;
                        PRIM_PTR_INT__r_s_k_s += lastoffset*3780;
                        PRIM_PTR_INT__r_s_l_s += lastoffset*4725;
                        PRIM_PTR_INT__r_s_m_s += lastoffset*5775;
                        PRIM_PTR_INT__r_s_n_s += lastoffset*6930;
                        PRIM_PTR_INT__r_s_o_s += lastoffset*8190;
                        PRIM_PTR_INT__r_s_q_s += lastoffset*9555;
                        PRIM_PTR_INT__t_s_i_s += lastoffset*3360;
                        PRIM_PTR_INT__t_s_k_s += lastoffset*4320;
                        PRIM_PTR_INT__t_s_l_s += lastoffset*5400;
                        PRIM_PTR_INT__t_s_m_s += lastoffset*6600;
                        PRIM_PTR_INT__t_s_n_s += lastoffset*7920;
                        PRIM_PTR_INT__t_s_o_s += lastoffset*9360;
                        PRIM_PTR_INT__t_s_q_s += lastoffset*10920;
                    }

                }  // 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__k_s_i_s = INT__k_s_i_s + abcd * 1008;
                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__l_s_i_s = INT__l_s_i_s + abcd * 1260;
                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__m_s_i_s = INT__m_s_i_s + abcd * 1540;
                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__n_s_i_s = INT__n_s_i_s + abcd * 1848;
                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__o_s_i_s = INT__o_s_i_s + abcd * 2184;
                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__q_s_i_s = INT__q_s_i_s + abcd * 2548;
                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__r_s_i_s = INT__r_s_i_s + abcd * 2940;
                double const * restrict HRR_INT__r_s_k_s = INT__r_s_k_s + abcd * 3780;
                double const * restrict HRR_INT__r_s_l_s = INT__r_s_l_s + abcd * 4725;
                double const * restrict HRR_INT__r_s_m_s = INT__r_s_m_s + abcd * 5775;
                double const * restrict HRR_INT__r_s_n_s = INT__r_s_n_s + abcd * 6930;
                double const * restrict HRR_INT__r_s_o_s = INT__r_s_o_s + abcd * 8190;
                double const * restrict HRR_INT__r_s_q_s = INT__r_s_q_s + abcd * 9555;
                double const * restrict HRR_INT__t_s_i_s = INT__t_s_i_s + abcd * 3360;
                double const * restrict HRR_INT__t_s_k_s = INT__t_s_k_s + abcd * 4320;
                double const * restrict HRR_INT__t_s_l_s = INT__t_s_l_s + abcd * 5400;
                double const * restrict HRR_INT__t_s_m_s = INT__t_s_m_s + abcd * 6600;
                double const * restrict HRR_INT__t_s_n_s = INT__t_s_n_s + abcd * 7920;
                double const * restrict HRR_INT__t_s_o_s = INT__t_s_o_s + abcd * 9360;
                double const * restrict HRR_INT__t_s_q_s = INT__t_s_q_s + abcd * 10920;
                double * restrict HRR_INT__k_k_i_i = INT__k_k_i_i + real_abcd * 1016064;

                // form INT__k_p_i_s
                ostei_general_hrr_J(7, 1, 6, 0, hAB, HRR_INT__l_s_i_s, HRR_INT__k_s_i_s, HRR_INT__k_p_i_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__l_p_i_s
                ostei_general_hrr_J(8, 1, 6, 0, hAB, HRR_INT__m_s_i_s, HRR_INT__l_s_i_s, HRR_INT__l_p_i_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__m_p_i_s
                ostei_general_hrr_J(9, 1, 6, 0, hAB, HRR_INT__n_s_i_s, HRR_INT__m_s_i_s, HRR_INT__m_p_i_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__n_p_i_s
                ostei_general_hrr_J(10, 1, 6, 0, hAB, HRR_INT__o_s_i_s, HRR_INT__n_s_i_s, HRR_INT__n_p_i_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__o_p_i_s
                ostei_general_hrr_J(11, 1, 6, 0, hAB, HRR_INT__q_s_i_s, HRR_INT__o_s_i_s, HRR_INT__o_p_i_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__q_p_i_s
                ostei_general_hrr_J(12, 1, 6, 0, hAB, HRR_INT__r_s_i_s, HRR_INT__q_s_i_s, HRR_INT__q_p_i_s);

                // form INT__q_p_k_s
                ostei_general_hrr_J(12, 1, 7, 0, hAB, HRR_INT__r_s_k_s, HRR_INT__q_s_k_s, HRR_INT__q_p_k_s);

                // form INT__q_p_l_s
                ostei_general_hrr_J(12, 1, 8, 0, hAB, HRR_INT__r_s_l_s, HRR_INT__q_s_l_s, HRR_INT__q_p_l_s);

                // form INT__q_p_m_s
                ostei_general_hrr_J(12, 1, 9, 0, hAB, HRR_INT__r_s_m_s, HRR_INT__q_s_m_s, HRR_INT__q_p_m_s);

                // form INT__q_p_n_s
                ostei_general_hrr_J(12, 1, 10, 0, hAB, HRR_INT__r_s_n_s, HRR_INT__q_s_n_s, HRR_INT__q_p_n_s);

                // form INT__q_p_o_s
                ostei_general_hrr_J(12, 1, 11, 0, hAB, HRR_INT__r_s_o_s, HRR_INT__q_s_o_s, HRR_INT__q_p_o_s);

                // form INT__q_p_q_s
                ostei_general_hrr_J(12, 1, 12, 0, hAB, HRR_INT__r_s_q_s, HRR_INT__q_s_q_s, HRR_INT__q_p_q_s);

                // form INT__r_p_i_s
                ostei_general_hrr_J(13, 1, 6, 0, hAB, HRR_INT__t_s_i_s, HRR_INT__r_s_i_s, HRR_INT__r_p_i_s);

                // form INT__r_p_k_s
                ostei_general_hrr_J(13, 1, 7, 0, hAB, HRR_INT__t_s_k_s, HRR_INT__r_s_k_s, HRR_INT__r_p_k_s);

                // form INT__r_p_l_s
                ostei_general_hrr_J(13, 1, 8, 0, hAB, HRR_INT__t_s_l_s, HRR_INT__r_s_l_s, HRR_INT__r_p_l_s);

                // form INT__r_p_m_s
                ostei_general_hrr_J(13, 1, 9, 0, hAB, HRR_INT__t_s_m_s, HRR_INT__r_s_m_s, HRR_INT__r_p_m_s);

                // form INT__r_p_n_s
                ostei_general_hrr_J(13, 1, 10, 0, hAB, HRR_INT__t_s_n_s, HRR_INT__r_s_n_s, HRR_INT__r_p_n_s);

                // form INT__r_p_o_s
                ostei_general_hrr_J(13, 1, 11, 0, hAB, HRR_INT__t_s_o_s, HRR_INT__r_s_o_s, HRR_INT__r_p_o_s);

                // form INT__r_p_q_s
                ostei_general_hrr_J(13, 1, 12, 0, hAB, HRR_INT__t_s_q_s, HRR_INT__r_s_q_s, HRR_INT__r_p_q_s);

                // form INT__k_d_i_s
                ostei_general_hrr_J(7, 2, 6, 0, hAB, HRR_INT__l_p_i_s, HRR_INT__k_p_i_s, HRR_INT__k_d_i_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__l_d_i_s
                ostei_general_hrr_J(8, 2, 6, 0, hAB, HRR_INT__m_p_i_s, HRR_INT__l_p_i_s, HRR_INT__l_d_i_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__m_d_i_s
                ostei_general_hrr_J(9, 2, 6, 0, hAB, HRR_INT__n_p_i_s, HRR_INT__m_p_i_s, HRR_INT__m_d_i_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__n_d_i_s
                ostei_general_hrr_J(10, 2, 6, 0, hAB, HRR_INT__o_p_i_s, HRR_INT__n_p_i_s, HRR_INT__n_d_i_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__o_d_i_s
                ostei_general_hrr_J(11, 2, 6, 0, hAB, HRR_INT__q_p_i_s, HRR_INT__o_p_i_s, HRR_INT__o_d_i_s);

                // form INT__o_d_k_s
                ostei_general_hrr_J(11, 2, 7, 0, hAB, HRR_INT__q_p_k_s, HRR_INT__o_p_k_s, HRR_INT__o_d_k_s);

                // form INT__o_d_l_s
                ostei_general_hrr_J(11, 2, 8, 0, hAB, HRR_INT__q_p_l_s, HRR_INT__o_p_l_s, HRR_INT__o_d_l_s);

                // form INT__o_d_m_s
                ostei_general_hrr_J(11, 2, 9, 0, hAB, HRR_INT__q_p_m_s, HRR_INT__o_p_m_s, HRR_INT__o_d_m_s);

                // form INT__o_d_n_s
                ostei_general_hrr_J(11, 2, 10, 0, hAB, HRR_INT__q_p_n_s, HRR_INT__o_p_n_s, HRR_INT__o_d_n_s);

                // form INT__o_d_o_s
                ostei_general_hrr_J(11, 2, 11, 0, hAB, HRR_INT__q_p_o_s, HRR_INT__o_p_o_s, HRR_INT__o_d_o_s);

                // form INT__o_d_q_s
                ostei_general_hrr_J(11, 2, 12, 0, hAB, HRR_INT__q_p_q_s, HRR_INT__o_p_q_s, HRR_INT__o_d_q_s);

                // form INT__q_d_i_s
                ostei_general_hrr_J(12, 2, 6, 0, hAB, HRR_INT__r_p_i_s, HRR_INT__q_p_i_s, HRR_INT__q_d_i_s);

                // form INT__q_d_k_s
                ostei_general_hrr_J(12, 2, 7, 0, hAB, HRR_INT__r_p_k_s, HRR_INT__q_p_k_s, HRR_INT__q_d_k_s);

                // form INT__q_d_l_s
                ostei_general_hrr_J(12, 2, 8, 0, hAB, HRR_INT__r_p_l_s, HRR_INT__q_p_l_s, HRR_INT__q_d_l_s);

                // form INT__q_d_m_s
                ostei_general_hrr_J(12, 2, 9, 0, hAB, HRR_INT__r_p_m_s, HRR_INT__q_p_m_s, HRR_INT__q_d_m_s);

                // form INT__q_d_n_s
                ostei_general_hrr_J(12, 2, 10, 0, hAB, HRR_INT__r_p_n_s, HRR_INT__q_p_n_s, HRR_INT__q_d_n_s);

                // form INT__q_d_o_s
                ostei_general_hrr_J(12, 2, 11, 0, hAB, HRR_INT__r_p_o_s, HRR_INT__q_p_o_s, HRR_INT__q_d_o_s);

                // form INT__q_d_q_s
                ostei_general_hrr_J(12, 2, 12, 0, hAB, HRR_INT__r_p_q_s, HRR_INT__q_p_q_s, HRR_INT__q_d_q_s);

                // form INT__k_f_i_s
                ostei_general_hrr_J(7, 3, 6, 0, hAB, HRR_INT__l_d_i_s, HRR_INT__k_d_i_s, HRR_INT__k_f_i_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__l_f_i_s
                ostei_general_hrr_J(8, 3, 6, 0, hAB, HRR_INT__m_d_i_s, HRR_INT__l_d_i_s, HRR_INT__l_f_i_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__m_f_i_s
                ostei_general_hrr_J(9, 3, 6, 0, hAB, HRR_INT__n_d_i_s, HRR_INT__m_d_i_s, HRR_INT__m_f_i_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__n_f_i_s
                ostei_general_hrr_J(10, 3, 6, 0, hAB, HRR_INT__o_d_i_s, HRR_INT__n_d_i_s, HRR_INT__n_f_i_s);

                // form INT__n_f_k_s
                ostei_general_hrr_J(10, 3, 7, 0, hAB, HRR_INT__o_d_k_s, HRR_INT__n_d_k_s, HRR_INT__n_f_k_s);

                // form INT__n_f_l_s
                ostei_general_hrr_J(10, 3, 8, 0, hAB, HRR_INT__o_d_l_s, HRR_INT__n_d_l_s, HRR_INT__n_f_l_s);

                // form INT__n_f_m_s
                ostei_general_hrr_J(10, 3, 9, 0, hAB, HRR_INT__o_d_m_s, HRR_INT__n_d_m_s, HRR_INT__n_f_m_s);

                // form INT__n_f_n_s
                ostei_general_hrr_J(10, 3, 10, 0, hAB, HRR_INT__o_d_n_s, HRR_INT__n_d_n_s, HRR_INT__n_f_n_s);

                // form INT__n_f_o_s
                ostei_general_hrr_J(10, 3, 11, 0, hAB, HRR_INT__o_d_o_s, HRR_INT__n_d_o_s, HRR_INT__n_f_o_s);

                // form INT__n_f_q_s
                ostei_general_hrr_J(10, 3, 12, 0, hAB, HRR_INT__o_d_q_s, HRR_INT__n_d_q_s, HRR_INT__n_f_q_s);

                // form INT__o_f_i_s
                ostei_general_hrr_J(11, 3, 6, 0, hAB, HRR_INT__q_d_i_s, HRR_INT__o_d_i_s, HRR_INT__o_f_i_s);

                // form INT__o_f_k_s
                ostei_general_hrr_J(11, 3, 7, 0, hAB, HRR_INT__q_d_k_s, HRR_INT__o_d_k_s, HRR_INT__o_f_k_s);

                // form INT__o_f_l_s
                ostei_general_hrr_J(11, 3, 8, 0, hAB, HRR_INT__q_d_l_s, HRR_INT__o_d_l_s, HRR_INT__o_f_l_s);

                // form INT__o_f_m_s
                ostei_general_hrr_J(11, 3, 9, 0, hAB, HRR_INT__q_d_m_s, HRR_INT__o_d_m_s, HRR_INT__o_f_m_s);

                // form INT__o_f_n_s
                ostei_general_hrr_J(11, 3, 10, 0, hAB, HRR_INT__q_d_n_s, HRR_INT__o_d_n_s, HRR_INT__o_f_n_s);

                // form INT__o_f_o_s
                ostei_general_hrr_J(11, 3, 11, 0, hAB, HRR_INT__q_d_o_s, HRR_INT__o_d_o_s, HRR_INT__o_f_o_s);

                // form INT__o_f_q_s
                ostei_general_hrr_J(11, 3, 12, 0, hAB, HRR_INT__q_d_q_s, HRR_INT__o_d_q_s, HRR_INT__o_f_q_s);

                // form INT__k_g_i_s
                ostei_general_hrr_J(7, 4, 6, 0, hAB, HRR_INT__l_f_i_s, HRR_INT__k_f_i_s, HRR_INT__k_g_i_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__l_g_i_s
                ostei_general_hrr_J(8, 4, 6, 0, hAB, HRR_INT__m_f_i_s, HRR_INT__l_f_i_s, HRR_INT__l_g_i_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__m_g_i_s
                ostei_general_hrr_J(9, 4, 6, 0, hAB, HRR_INT__n_f_i_s, HRR_INT__m_f_i_s, HRR_INT__m_g_i_s);

                // form INT__m_g_k_s
                ostei_general_hrr_J(9, 4, 7, 0, hAB, HRR_INT__n_f_k_s, HRR_INT__m_f_k_s, HRR_INT__m_g_k_s);

                // form INT__m_g_l_s
                ostei_general_hrr_J(9, 4, 8, 0, hAB, HRR_INT__n_f_l_s, HRR_INT__m_f_l_s, HRR_INT__m_g_l_s);

                // form INT__m_g_m_s
                ostei_general_hrr_J(9, 4, 9, 0, hAB, HRR_INT__n_f_m_s, HRR_INT__m_f_m_s, HRR_INT__m_g_m_s);

                // form INT__m_g_n_s
                ostei_general_hrr_J(9, 4, 10, 0, hAB, HRR_INT__n_f_n_s, HRR_INT__m_f_n_s, HRR_INT__m_g_n_s);

                // form INT__m_g_o_s
                ostei_general_hrr_J(9, 4, 11, 0, hAB, HRR_INT__n_f_o_s, HRR_INT__m_f_o_s, HRR_INT__m_g_o_s);

                // form INT__m_g_q_s
                ostei_general_hrr_J(9, 4, 12, 0, hAB, HRR_INT__n_f_q_s, HRR_INT__m_f_q_s, HRR_INT__m_g_q_s);

                // form INT__n_g_i_s
                ostei_general_hrr_J(10, 4, 6, 0, hAB, HRR_INT__o_f_i_s, HRR_INT__n_f_i_s, HRR_INT__n_g_i_s);

                // form INT__n_g_k_s
                ostei_general_hrr_J(10, 4, 7, 0, hAB, HRR_INT__o_f_k_s, HRR_INT__n_f_k_s, HRR_INT__n_g_k_s);

                // form INT__n_g_l_s
                ostei_general_hrr_J(10, 4, 8, 0, hAB, HRR_INT__o_f_l_s, HRR_INT__n_f_l_s, HRR_INT__n_g_l_s);

                // form INT__n_g_m_s
                ostei_general_hrr_J(10, 4, 9, 0, hAB, HRR_INT__o_f_m_s, HRR_INT__n_f_m_s, HRR_INT__n_g_m_s);

                // form INT__n_g_n_s
                ostei_general_hrr_J(10, 4, 10, 0, hAB, HRR_INT__o_f_n_s, HRR_INT__n_f_n_s, HRR_INT__n_g_n_s);

                // form INT__n_g_o_s
                ostei_general_hrr_J(10, 4, 11, 0, hAB, HRR_INT__o_f_o_s, HRR_INT__n_f_o_s, HRR_INT__n_g_o_s);

                // form INT__n_g_q_s
                ostei_general_hrr_J(10, 4, 12, 0, hAB, HRR_INT__o_f_q_s, HRR_INT__n_f_q_s, HRR_INT__n_g_q_s);

                // form INT__k_h_i_s
                ostei_general_hrr_J(7, 5, 6, 0, hAB, HRR_INT__l_g_i_s, HRR_INT__k_g_i_s, HRR_INT__k_h_i_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__l_h_i_s
                ostei_general_hrr_J(8, 5, 6, 0, hAB, HRR_INT__m_g_i_s, HRR_INT__l_g_i_s, HRR_INT__l_h_i_s);

                // form INT__l_h_k_s
                ostei_general_hrr_J(8, 5, 7, 0, hAB, HRR_INT__m_g_k_s, HRR_INT__l_g_k_s, HRR_INT__l_h_k_s);

                // form INT__l_h_l_s
                ostei_general_hrr_J(8, 5, 8, 0, hAB, HRR_INT__m_g_l_s, HRR_INT__l_g_l_s, HRR_INT__l_h_l_s);

                // form INT__l_h_m_s
                ostei_general_hrr_J(8, 5, 9, 0, hAB, HRR_INT__m_g_m_s, HRR_INT__l_g_m_s, HRR_INT__l_h_m_s);

                // form INT__l_h_n_s
                ostei_general_hrr_J(8, 5, 10, 0, hAB, HRR_INT__m_g_n_s, HRR_INT__l_g_n_s, HRR_INT__l_h_n_s);

                // form INT__l_h_o_s
                ostei_general_hrr_J(8, 5, 11, 0, hAB, HRR_INT__m_g_o_s, HRR_INT__l_g_o_s, HRR_INT__l_h_o_s);

                // form INT__l_h_q_s
                ostei_general_hrr_J(8, 5, 12, 0, hAB, HRR_INT__m_g_q_s, HRR_INT__l_g_q_s, HRR_INT__l_h_q_s);

                // form INT__m_h_i_s
                ostei_general_hrr_J(9, 5, 6, 0, hAB, HRR_INT__n_g_i_s, HRR_INT__m_g_i_s, HRR_INT__m_h_i_s);

                // form INT__m_h_k_s
                ostei_general_hrr_J(9, 5, 7, 0, hAB, HRR_INT__n_g_k_s, HRR_INT__m_g_k_s, HRR_INT__m_h_k_s);

                // form INT__m_h_l_s
                ostei_general_hrr_J(9, 5, 8, 0, hAB, HRR_INT__n_g_l_s, HRR_INT__m_g_l_s, HRR_INT__m_h_l_s);

                // form INT__m_h_m_s
                ostei_general_hrr_J(9, 5, 9, 0, hAB, HRR_INT__n_g_m_s, HRR_INT__m_g_m_s, HRR_INT__m_h_m_s);

                // form INT__m_h_n_s
                ostei_general_hrr_J(9, 5, 10, 0, hAB, HRR_INT__n_g_n_s, HRR_INT__m_g_n_s, HRR_INT__m_h_n_s);

                // form INT__m_h_o_s
                ostei_general_hrr_J(9, 5, 11, 0, hAB, HRR_INT__n_g_o_s, HRR_INT__m_g_o_s, HRR_INT__m_h_o_s);

                // form INT__m_h_q_s
                ostei_general_hrr_J(9, 5, 12, 0, hAB, HRR_INT__n_g_q_s, HRR_INT__m_g_q_s, HRR_INT__m_h_q_s);

                // form INT__k_i_i_s
                ostei_general_hrr_J(7, 6, 6, 0, hAB, HRR_INT__l_h_i_s, HRR_INT__k_h_i_s, HRR_INT__k_i_i_s);

                // form INT__k_i_k_s
                ostei_general_hrr_J(7, 6, 7, 0, hAB, HRR_INT__l_h_k_s, HRR_INT__k_h_k_s, HRR_INT__k_i_k_s);

                // form INT__k_i_l_s
                ostei_general_hrr_J(7, 6, 8, 0, hAB, HRR_INT__l_h_l_s, HRR_INT__k_h_l_s, HRR_INT__k_i_l_s);

                // form INT__k_i_m_s
                ostei_general_hrr_J(7, 6, 9, 0, hAB, HRR_INT__l_h_m_s, HRR_INT__k_h_m_s, HRR_INT__k_i_m_s);

                // form INT__k_i_n_s
                ostei_general_hrr_J(7, 6, 10, 0, hAB, HRR_INT__l_h_n_s, HRR_INT__k_h_n_s, HRR_INT__k_i_n_s);

                // form INT__k_i_o_s
                ostei_general_hrr_J(7, 6, 11, 0, hAB, HRR_INT__l_h_o_s, HRR_INT__k_h_o_s, HRR_INT__k_i_o_s);

                // form INT__k_i_q_s
                ostei_general_hrr_J(7, 6, 12, 0, hAB, HRR_INT__l_h_q_s, HRR_INT__k_h_q_s, HRR_INT__k_i_q_s);

                // form INT__l_i_i_s
                ostei_general_hrr_J(8, 6, 6, 0, hAB, HRR_INT__m_h_i_s, HRR_INT__l_h_i_s, HRR_INT__l_i_i_s);

                // form INT__l_i_k_s
                ostei_general_hrr_J(8, 6, 7, 0, hAB, HRR_INT__m_h_k_s, HRR_INT__l_h_k_s, HRR_INT__l_i_k_s);

                // form INT__l_i_l_s
                ostei_general_hrr_J(8, 6, 8, 0, hAB, HRR_INT__m_h_l_s, HRR_INT__l_h_l_s, HRR_INT__l_i_l_s);

                // form INT__l_i_m_s
                ostei_general_hrr_J(8, 6, 9, 0, hAB, HRR_INT__m_h_m_s, HRR_INT__l_h_m_s, HRR_INT__l_i_m_s);

                // form INT__l_i_n_s
                ostei_general_hrr_J(8, 6, 10, 0, hAB, HRR_INT__m_h_n_s, HRR_INT__l_h_n_s, HRR_INT__l_i_n_s);

                // form INT__l_i_o_s
                ostei_general_hrr_J(8, 6, 11, 0, hAB, HRR_INT__m_h_o_s, HRR_INT__l_h_o_s, HRR_INT__l_i_o_s);

                // form INT__l_i_q_s
                ostei_general_hrr_J(8, 6, 12, 0, hAB, HRR_INT__m_h_q_s, HRR_INT__l_h_q_s, HRR_INT__l_i_q_s);

                // form INT__k_k_i_s
                ostei_general_hrr_J(7, 7, 6, 0, hAB, HRR_INT__l_i_i_s, HRR_INT__k_i_i_s, HRR_INT__k_k_i_s);

                // form INT__k_k_k_s
                ostei_general_hrr_J(7, 7, 7, 0, hAB, HRR_INT__l_i_k_s, HRR_INT__k_i_k_s, HRR_INT__k_k_k_s);

                // form INT__k_k_l_s
                ostei_general_hrr_J(7, 7, 8, 0, hAB, HRR_INT__l_i_l_s, HRR_INT__k_i_l_s, HRR_INT__k_k_l_s);

                // form INT__k_k_m_s
                ostei_general_hrr_J(7, 7, 9, 0, hAB, HRR_INT__l_i_m_s, HRR_INT__k_i_m_s, HRR_INT__k_k_m_s);

                // form INT__k_k_n_s
                ostei_general_hrr_J(7, 7, 10, 0, hAB, HRR_INT__l_i_n_s, HRR_INT__k_i_n_s, HRR_INT__k_k_n_s);

                // form INT__k_k_o_s
                ostei_general_hrr_J(7, 7, 11, 0, hAB, HRR_INT__l_i_o_s, HRR_INT__k_i_o_s, HRR_INT__k_k_o_s);

                // form INT__k_k_q_s
                ostei_general_hrr_J(7, 7, 12, 0, hAB, HRR_INT__l_i_q_s, HRR_INT__k_i_q_s, HRR_INT__k_k_q_s);

                // form INT__k_k_i_p
                ostei_general_hrr_L(7, 7, 6, 1, hCD, HRR_INT__k_k_k_s, HRR_INT__k_k_i_s, HRR_INT__k_k_i_p);

                // form INT__k_k_k_p
                ostei_general_hrr_L(7, 7, 7, 1, hCD, HRR_INT__k_k_l_s, HRR_INT__k_k_k_s, HRR_INT__k_k_k_p);

                // form INT__k_k_l_p
                ostei_general_hrr_L(7, 7, 8, 1, hCD, HRR_INT__k_k_m_s, HRR_INT__k_k_l_s, HRR_INT__k_k_l_p);

                // form INT__k_k_m_p
                ostei_general_hrr_L(7, 7, 9, 1, hCD, HRR_INT__k_k_n_s, HRR_INT__k_k_m_s, HRR_INT__k_k_m_p);

                // form INT__k_k_n_p
                ostei_general_hrr_L(7, 7, 10, 1, hCD, HRR_INT__k_k_o_s, HRR_INT__k_k_n_s, HRR_INT__k_k_n_p);

                // form INT__k_k_o_p
                ostei_general_hrr_L(7, 7, 11, 1, hCD, HRR_INT__k_k_q_s, HRR_INT__k_k_o_s, HRR_INT__k_k_o_p);

                // form INT__k_k_i_d
                ostei_general_hrr_L(7, 7, 6, 2, hCD, HRR_INT__k_k_k_p, HRR_INT__k_k_i_p, HRR_INT__k_k_i_d);

                // form INT__k_k_k_d
                ostei_general_hrr_L(7, 7, 7, 2, hCD, HRR_INT__k_k_l_p, HRR_INT__k_k_k_p, HRR_INT__k_k_k_d);

                // form INT__k_k_l_d
                ostei_general_hrr_L(7, 7, 8, 2, hCD, HRR_INT__k_k_m_p, HRR_INT__k_k_l_p, HRR_INT__k_k_l_d);

                // form INT__k_k_m_d
                ostei_general_hrr_L(7, 7, 9, 2, hCD, HRR_INT__k_k_n_p, HRR_INT__k_k_m_p, HRR_INT__k_k_m_d);

                // form INT__k_k_n_d
                ostei_general_hrr_L(7, 7, 10, 2, hCD, HRR_INT__k_k_o_p, HRR_INT__k_k_n_p, HRR_INT__k_k_n_d);

                // form INT__k_k_i_f
                ostei_general_hrr_L(7, 7, 6, 3, hCD, HRR_INT__k_k_k_d, HRR_INT__k_k_i_d, HRR_INT__k_k_i_f);

                // form INT__k_k_k_f
                ostei_general_hrr_L(7, 7, 7, 3, hCD, HRR_INT__k_k_l_d, HRR_INT__k_k_k_d, HRR_INT__k_k_k_f);

                // form INT__k_k_l_f
                ostei_general_hrr_L(7, 7, 8, 3, hCD, HRR_INT__k_k_m_d, HRR_INT__k_k_l_d, HRR_INT__k_k_l_f);

                // form INT__k_k_m_f
                ostei_general_hrr_L(7, 7, 9, 3, hCD, HRR_INT__k_k_n_d, HRR_INT__k_k_m_d, HRR_INT__k_k_m_f);

                // form INT__k_k_i_g
                ostei_general_hrr_L(7, 7, 6, 4, hCD, HRR_INT__k_k_k_f, HRR_INT__k_k_i_f, HRR_INT__k_k_i_g);

                // form INT__k_k_k_g
                ostei_general_hrr_L(7, 7, 7, 4, hCD, HRR_INT__k_k_l_f, HRR_INT__k_k_k_f, HRR_INT__k_k_k_g);

                // form INT__k_k_l_g
                ostei_general_hrr_L(7, 7, 8, 4, hCD, HRR_INT__k_k_m_f, HRR_INT__k_k_l_f, HRR_INT__k_k_l_g);

                // form INT__k_k_i_h
                ostei_general_hrr_L(7, 7, 6, 5, hCD, HRR_INT__k_k_k_g, HRR_INT__k_k_i_g, HRR_INT__k_k_i_h);

                // form INT__k_k_k_h
                ostei_general_hrr_L(7, 7, 7, 5, hCD, HRR_INT__k_k_l_g, HRR_INT__k_k_k_g, HRR_INT__k_k_k_h);

                // form INT__k_k_i_i
                ostei_general_hrr_L(7, 7, 6, 6, hCD, HRR_INT__k_k_k_h, HRR_INT__k_k_i_h, HRR_INT__k_k_i_i);


            }  // close HRR loop


        }   // close loop cdbatch

        istart = iend;
    }  // close loop over ab

    return P.nshell12_clip * Q.nshell12_clip;
}

