void math_gauss_quad_coefficients(int n, const double **xGQ,
                                  const double **wGQ) {
  static const double x[] = {
      0.5000000000000000, 0.2113248654051871, 0.7886751345948129,
      0.1127016653792583, 0.5000000000000000, 0.8872983346207417,
      0.0694318442029737, 0.3300094782075719, 0.6699905217924281,
      0.9305681557970262, 0.0469100770306680, 0.2307653449471584,
      0.5000000000000000, 0.7692346550528415, 0.9530899229693319,
      0.0337652428984240, 0.1693953067668678, 0.3806904069584016,
      0.6193095930415985, 0.8306046932331322, 0.9662347571015760,
      0.0254460438286208, 0.1292344072003028, 0.2970774243113014,
      0.5000000000000000, 0.7029225756886985, 0.8707655927996972,
      0.9745539561713792, 0.0198550717512319, 0.1016667612931866,
      0.2372337950418355, 0.4082826787521751, 0.5917173212478249,
      0.7627662049581645, 0.8983332387068134, 0.9801449282487682,
      0.0159198802461870, 0.0819844463366821, 0.1933142836497048,
      0.3378732882980955, 0.5000000000000000, 0.6621267117019045,
      0.8066857163502952, 0.9180155536633179, 0.9840801197538130,
      0.0130467357414141, 0.0674683166555077, 0.1602952158504878,
      0.2833023029353764, 0.4255628305091844, 0.5744371694908156,
      0.7166976970646236, 0.8397047841495122, 0.9325316833444923,
      0.9869532642585859, 0.0108856709269715, 0.0564687001159523,
      0.1349239972129753, 0.2404519353965941, 0.3652284220238275,
      0.5000000000000000, 0.6347715779761725, 0.7595480646034058,
      0.8650760027870247, 0.9435312998840477, 0.9891143290730284,
      0.0092196828766404, 0.0479413718147625, 0.1150486629028477,
      0.2063410228566913, 0.3160842505009099, 0.4373832957442655,
      0.5626167042557344, 0.6839157494990901, 0.7936589771433087,
      0.8849513370971523, 0.9520586281852375, 0.9907803171233596};
  static const double w[] = {
      1.0000000000000000, 0.5000000000000000, 0.5000000000000000,
      0.2777777777777778, 0.4444444444444444, 0.2777777777777778,
      0.1739274225687269, 0.3260725774312731, 0.3260725774312731,
      0.1739274225687269, 0.1184634425280946, 0.2393143352496833,
      0.2844444444444444, 0.2393143352496833, 0.1184634425280946,
      0.0856622461895852, 0.1803807865240693, 0.2339569672863455,
      0.2339569672863455, 0.1803807865240693, 0.0856622461895852,
      0.0647424830844349, 0.1398526957446383, 0.1909150252525595,
      0.2089795918367347, 0.1909150252525595, 0.1398526957446383,
      0.0647424830844349, 0.0506142681451881, 0.1111905172266872,
      0.1568533229389436, 0.1813418916891810, 0.1813418916891810,
      0.1568533229389436, 0.1111905172266872, 0.0506142681451881,
      0.0406371941807872, 0.0903240803474287, 0.1303053482014677,
      0.1561735385200015, 0.1651196775006299, 0.1561735385200015,
      0.1303053482014677, 0.0903240803474287, 0.0406371941807872,
      0.0333356721543440, 0.0747256745752903, 0.1095431812579910,
      0.1346333596549981, 0.1477621123573765, 0.1477621123573765,
      0.1346333596549981, 0.1095431812579910, 0.0747256745752903,
      0.0333356721543440, 0.0278342835580868, 0.0627901847324523,
      0.0931451054638671, 0.1165968822959952, 0.1314022722551233,
      0.1364625433889503, 0.1314022722551233, 0.1165968822959952,
      0.0931451054638671, 0.0627901847324523, 0.0278342835580868,
      0.0235876681932559, 0.0534696629976592, 0.0800391642716731,
      0.1015837133615330, 0.1167462682691774, 0.1245735229067014,
      0.1245735229067014, 0.1167462682691774, 0.1015837133615330,
      0.0800391642716731, 0.0534696629976592, 0.0235876681932559};
  n *= n - 1;
  n /= 2;
  *xGQ = x + n;
  *wGQ = w + n;
}


x86 assembly (clang, -O0):
<math_gauss_quad_coefficients>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
imul   -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
movslq -0x4(%rbp),%rax
lea    0xecb(%rip),%rcx
shl    $0x3,%rax
add    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
movslq -0x4(%rbp),%rax
lea    0x1122(%rip),%rcx
shl    $0x3,%rax
add    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<math_gauss_quad_coefficients>:
lea    -0x1(%rdi),%eax
imul   %edi,%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
sar    %ecx
movslq %ecx,%rax
lea    0xee7(%rip),%rcx
lea    (%rcx,%rax,8),%rcx
mov    %rcx,(%rsi)
lea    0x1149(%rip),%rcx
lea    (%rcx,%rax,8),%rax
mov    %rax,(%rdx)
ret

LLVM IR (-O0):
@math_gauss_quad_coefficients.x = internal constant [78 x double] [double 5.000000e-01, double 0x3FCB0CB174DF99C7, double 0x3FE93CD3A2C8198E, double 0x3FBCDA042F0236E0, double 5.000000e-01, double 0x3FEC64BF7A1FB924, double 0x3FB1C6490C2719EB, double 0x3FD51EE013116103, double 0x3FE5708FF6774F7F, double 0x3FEDC736DE7B1CC2, double 0x3FA80498FD662CB5, double 0x3FCD89B804CC91F4, double 5.000000e-01, double 0x3FE89D91FECCDB82, double 0x3FEE7FB670299D34, double 0x3FA149AD8BFAFF14, double 0x3FC5AEBED3546D45, double 0x3FD85D3B4BF26290, double 0x3FE3D1625A06CEB9, double 0x3FEA94504B2AE4AF, double 0x3FEEEB652740500F, double 0x3F9A0E871839DD7C, double 0x3FC08AC0C838BC55, double 0x3FD303510773014F, double 5.000000e-01, double 0x3FE67E577C467F58, double 0x3FEBDD4FCDF1D0EB, double 0x3FEF2F8BC73E3114, double 0x3F9454E34F53399D, double 0x3FBA06D536D82F85, double 0x3FCE5DAD4F9AF698, double 0x3FDA214DAC30E32F, double 0x3FE2EF5929E78E69, double 0x3FE86894AC19425A, double 0x3FECBF255924FA0F, double 0x3FEF5D58E5856634, double 0x3F904D4D140DEFAC, double 0x3FB4FCEEC3CBF59F, double 0x3FC8BE85BF1004E7, double 0x3FD59FB748DBAACC, double 5.000000e-01, double 0x3FE530245B922A9A, double 0x3FE9D05E903BFEC6, double 0x3FED60622786814C, double 0x3FEF7D95975F9083, double 0x3F8AB83F3AA1A4F0, double 0x3FB1459A858D3432, double 0x3FC4848DBAE43CD1, double 0x3FD2219FFB7F4A92, double 0x3FDB3C6BE1DB8762, double 0x3FE261CA0F123C4F, double 0x3FE6EF3002405AB7, double 0x3FEADEDC9146F0CC, double 0x3FEDD74CAF4E597A, double 0x3FEF951F0315796C, double 0x3F864B3A0502C958, double 0x3FACE977287DC562, double 0x3FC1453085BCD76B, double 0x3FCEC7210764E63E, double 0x3FD75FE7080A5E9F, double 5.000000e-01, double 0x3FE4500C7BFAD0B0, double 0x3FE84E37BE26C670, double 0x3FEBAEB3DE90CA25, double 0x3FEE31688D7823AA, double 0x3FEFA6D317EBF4DA, double 0x3F82E1C4E37A2FED, double 0x3FA88BC58023BA59, double 0x3FBD73D4449DC32B, double 0x3FCA6961F47F100F, double 0x3FD43AB96FABA731, double 0x3FDBFE1681C273C6, double 0x3FE200F4BF1EC61C, double 0x3FE5E2A3482A2C67, double 0x3FE965A782E03BFC, double 0x3FEC5185776C479B, double 0x3FEE7743A7FDC45A, double 0x3FEFB478EC721740]
@math_gauss_quad_coefficients.w = internal constant [78 x double] [double 1.000000e+00, double 5.000000e-01, double 5.000000e-01, double 0x3FD1C71C71C71C72, double 0x3FDC71C71C71C71C, double 0x3FD1C71C71C71C72, double 0x3FC64340F7E7B66A, double 0x3FD4DE5F840C24CB, double 0x3FD4DE5F840C24CB, double 0x3FC64340F7E7B66A, double 0x3FBE539EC36E0390, double 0x3FCEA1DA25AE415D, double 0x3FD23456789ABCDE, double 0x3FCEA1DA25AE415D, double 0x3FBE539EC36E0390, double 0x3FB5EDF601E2DBFA, double 0x3FC716B7B5794C1C, double 0x3FCDF24D499545E7, double 0x3FCDF24D499545E7, double 0x3FC716B7B5794C1C, double 0x3FB5EDF601E2DBFA, double 0x3FB092F69F826D5A, double 0x3FC1E6B1713D8643, double 0x3FC86FE74EE32B3E, double 0x3FCABFD7E03C2FA6, double 0x3FC86FE74EE32B3E, double 0x3FC1E6B1713D8643, double 0x3FB092F69F826D5A, double 0x3FA9EA1D04CA0370, double 0x3FBC76FB531D2B93, double 0x3FC413C50A255614, double 0x3FC736360B199343, double 0x3FC736360B199343, double 0x3FC413C50A255614, double 0x3FBC76FB531D2B93, double 0x3FA9EA1D04CA0370, double 0x3FA4CE65F803EEF7, double 0x3FB71F7A9B222BEA, double 0x3FC0ADD87C827505, double 0x3FC3FD7E9838D514, double 0x3FC522A43F65486A, double 0x3FC3FD7E9838D514, double 0x3FC0ADD87C827505, double 0x3FB71F7A9B222BEA, double 0x3FA4CE65F803EEF7, double 0x3FA1115F8B62DC15, double 0x3FB32138C878EFE5, double 0x3FBC0B059D00BC30, double 0x3FC13BAA7A559BFB, double 0x3FC2E9DE7014D6F1, double 0x3FC2E9DE7014D6F1, double 0x3FC13BAA7A559BFB, double 0x3FBC0B059D00BC30, double 0x3FB32138C878EFE5, double 0x3FA1115F8B62DC15, double 0x3F9C8097265BB91C, double 0x3FB013047DEF88CD, double 0x3FB7D85B8DBFF197, double 0x3FBDD94B1446E059, double 0x3FC0D1CA26FA590E, double 0x3FC1779AC87E04D6, double 0x3FC0D1CA26FA590E, double 0x3FBDD94B1446E059, double 0x3FB7D85B8DBFF197, double 0x3FB013047DEF88CD, double 0x3F9C8097265BB91C, double 0x3F98275D9DEA6D8B, double 0x3FAB60602BCE617F, double 0x3FB47D7258F22D8E, double 0x3FBA0163E6B1AB75, double 0x3FBDE3155C256AB5, double 0x3FBFE40CE6D4F026, double 0x3FBFE40CE6D4F026, double 0x3FBDE3155C256AB5, double 0x3FBA0163E6B1AB75, double 0x3FB47D7258F22D8E, double 0x3FAB60602BCE617F, double 0x3F98275D9DEA6D8B]
define void @math_gauss_quad_coefficients(i32 %0, double** %1, double** %2) {
%4 = alloca i32
%5 = alloca double**
%6 = alloca double**
store i32 %0, i32* %4
store double** %1, double*** %5
store double** %2, double*** %6
%7 = load i32, i32* %4
%8 = sub nsw i32 %7, 1
%9 = load i32, i32* %4
%10 = mul nsw i32 %9, %8
store i32 %10, i32* %4
%11 = load i32, i32* %4
%12 = sdiv i32 %11, 2
store i32 %12, i32* %4
%13 = load i32, i32* %4
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds double, double* getelementptr inbounds ([78 x double], [78 x double]* @math_gauss_quad_coefficients.x, i64 0, i64 0), i64 %14
%16 = load double**, double*** %5
store double* %15, double** %16
%17 = load i32, i32* %4
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds double, double* getelementptr inbounds ([78 x double], [78 x double]* @math_gauss_quad_coefficients.w, i64 0, i64 0), i64 %18
%20 = load double**, double*** %6
store double* %19, double** %20
ret void
}

LLVM IR (-O2):
@math_gauss_quad_coefficients.x = internal constant [78 x double] [double 5.000000e-01, double 0x3FCB0CB174DF99C7, double 0x3FE93CD3A2C8198E, double 0x3FBCDA042F0236E0, double 5.000000e-01, double 0x3FEC64BF7A1FB924, double 0x3FB1C6490C2719EB, double 0x3FD51EE013116103, double 0x3FE5708FF6774F7F, double 0x3FEDC736DE7B1CC2, double 0x3FA80498FD662CB5, double 0x3FCD89B804CC91F4, double 5.000000e-01, double 0x3FE89D91FECCDB82, double 0x3FEE7FB670299D34, double 0x3FA149AD8BFAFF14, double 0x3FC5AEBED3546D45, double 0x3FD85D3B4BF26290, double 0x3FE3D1625A06CEB9, double 0x3FEA94504B2AE4AF, double 0x3FEEEB652740500F, double 0x3F9A0E871839DD7C, double 0x3FC08AC0C838BC55, double 0x3FD303510773014F, double 5.000000e-01, double 0x3FE67E577C467F58, double 0x3FEBDD4FCDF1D0EB, double 0x3FEF2F8BC73E3114, double 0x3F9454E34F53399D, double 0x3FBA06D536D82F85, double 0x3FCE5DAD4F9AF698, double 0x3FDA214DAC30E32F, double 0x3FE2EF5929E78E69, double 0x3FE86894AC19425A, double 0x3FECBF255924FA0F, double 0x3FEF5D58E5856634, double 0x3F904D4D140DEFAC, double 0x3FB4FCEEC3CBF59F, double 0x3FC8BE85BF1004E7, double 0x3FD59FB748DBAACC, double 5.000000e-01, double 0x3FE530245B922A9A, double 0x3FE9D05E903BFEC6, double 0x3FED60622786814C, double 0x3FEF7D95975F9083, double 0x3F8AB83F3AA1A4F0, double 0x3FB1459A858D3432, double 0x3FC4848DBAE43CD1, double 0x3FD2219FFB7F4A92, double 0x3FDB3C6BE1DB8762, double 0x3FE261CA0F123C4F, double 0x3FE6EF3002405AB7, double 0x3FEADEDC9146F0CC, double 0x3FEDD74CAF4E597A, double 0x3FEF951F0315796C, double 0x3F864B3A0502C958, double 0x3FACE977287DC562, double 0x3FC1453085BCD76B, double 0x3FCEC7210764E63E, double 0x3FD75FE7080A5E9F, double 5.000000e-01, double 0x3FE4500C7BFAD0B0, double 0x3FE84E37BE26C670, double 0x3FEBAEB3DE90CA25, double 0x3FEE31688D7823AA, double 0x3FEFA6D317EBF4DA, double 0x3F82E1C4E37A2FED, double 0x3FA88BC58023BA59, double 0x3FBD73D4449DC32B, double 0x3FCA6961F47F100F, double 0x3FD43AB96FABA731, double 0x3FDBFE1681C273C6, double 0x3FE200F4BF1EC61C, double 0x3FE5E2A3482A2C67, double 0x3FE965A782E03BFC, double 0x3FEC5185776C479B, double 0x3FEE7743A7FDC45A, double 0x3FEFB478EC721740]
@math_gauss_quad_coefficients.w = internal constant [78 x double] [double 1.000000e+00, double 5.000000e-01, double 5.000000e-01, double 0x3FD1C71C71C71C72, double 0x3FDC71C71C71C71C, double 0x3FD1C71C71C71C72, double 0x3FC64340F7E7B66A, double 0x3FD4DE5F840C24CB, double 0x3FD4DE5F840C24CB, double 0x3FC64340F7E7B66A, double 0x3FBE539EC36E0390, double 0x3FCEA1DA25AE415D, double 0x3FD23456789ABCDE, double 0x3FCEA1DA25AE415D, double 0x3FBE539EC36E0390, double 0x3FB5EDF601E2DBFA, double 0x3FC716B7B5794C1C, double 0x3FCDF24D499545E7, double 0x3FCDF24D499545E7, double 0x3FC716B7B5794C1C, double 0x3FB5EDF601E2DBFA, double 0x3FB092F69F826D5A, double 0x3FC1E6B1713D8643, double 0x3FC86FE74EE32B3E, double 0x3FCABFD7E03C2FA6, double 0x3FC86FE74EE32B3E, double 0x3FC1E6B1713D8643, double 0x3FB092F69F826D5A, double 0x3FA9EA1D04CA0370, double 0x3FBC76FB531D2B93, double 0x3FC413C50A255614, double 0x3FC736360B199343, double 0x3FC736360B199343, double 0x3FC413C50A255614, double 0x3FBC76FB531D2B93, double 0x3FA9EA1D04CA0370, double 0x3FA4CE65F803EEF7, double 0x3FB71F7A9B222BEA, double 0x3FC0ADD87C827505, double 0x3FC3FD7E9838D514, double 0x3FC522A43F65486A, double 0x3FC3FD7E9838D514, double 0x3FC0ADD87C827505, double 0x3FB71F7A9B222BEA, double 0x3FA4CE65F803EEF7, double 0x3FA1115F8B62DC15, double 0x3FB32138C878EFE5, double 0x3FBC0B059D00BC30, double 0x3FC13BAA7A559BFB, double 0x3FC2E9DE7014D6F1, double 0x3FC2E9DE7014D6F1, double 0x3FC13BAA7A559BFB, double 0x3FBC0B059D00BC30, double 0x3FB32138C878EFE5, double 0x3FA1115F8B62DC15, double 0x3F9C8097265BB91C, double 0x3FB013047DEF88CD, double 0x3FB7D85B8DBFF197, double 0x3FBDD94B1446E059, double 0x3FC0D1CA26FA590E, double 0x3FC1779AC87E04D6, double 0x3FC0D1CA26FA590E, double 0x3FBDD94B1446E059, double 0x3FB7D85B8DBFF197, double 0x3FB013047DEF88CD, double 0x3F9C8097265BB91C, double 0x3F98275D9DEA6D8B, double 0x3FAB60602BCE617F, double 0x3FB47D7258F22D8E, double 0x3FBA0163E6B1AB75, double 0x3FBDE3155C256AB5, double 0x3FBFE40CE6D4F026, double 0x3FBFE40CE6D4F026, double 0x3FBDE3155C256AB5, double 0x3FBA0163E6B1AB75, double 0x3FB47D7258F22D8E, double 0x3FAB60602BCE617F, double 0x3F98275D9DEA6D8B]
define void @math_gauss_quad_coefficients(i32 %0, double** nocapture writeonly %1, double** nocapture writeonly %2) {
%4 = add nsw i32 %0, -1
%5 = mul nsw i32 %4, %0
%6 = sdiv i32 %5, 2
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds [78 x double], [78 x double]* @math_gauss_quad_coefficients.x, i64 0, i64 %7
store double* %8, double** %1
%9 = getelementptr inbounds [78 x double], [78 x double]* @math_gauss_quad_coefficients.w, i64 0, i64 %7
store double* %9, double** %2
ret void
}