#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
struct twobody_f {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ scalars_minv_f_poly(double, double, double, double *);
int /*<<< orphan*/ scalars_minv_ft_poly(double, double, double, double *);
int /*<<< orphan*/ scalars_minv_fts_poly(double, double, double, double *);
int /*<<< orphan*/ twobody_scalars_res(int, double, double, double,
                                       struct twobody_f *, int, int, int,
                                       double *);
void scalars_lub_poly(int version, double r, double a1, double a2,
                      struct twobody_f *f12, int n, int flag_lub, double *lub) {
  int i;
  for (i = 0; i < 22; i++) {
    lub[i] = 0.0;
  }
  double res[22];
  twobody_scalars_res(version, r, a1, a2, f12, n, flag_lub, 1, res);
  double minv[44];
  if (version == 0) {
    scalars_minv_f_poly(r, a1, a2, minv);
  } else if (version == 1) {
    scalars_minv_ft_poly(r, a1, a2, minv);
  } else {
    scalars_minv_fts_poly(r, a1, a2, minv);
  }
  lub[0] = res[0] - minv[0];
  lub[1] = res[1] - minv[1];
  lub[2] = res[2] - minv[4];
  lub[3] = res[3] - minv[5];
  if (version == 0)
    return;
  lub[4] = res[4] - minv[8];
  lub[5] = res[5] - minv[9];
  lub[6] = res[6] - minv[12];
  lub[7] = res[7] - minv[13];
  lub[8] = res[8] - minv[16];
  lub[9] = res[9] - minv[17];
  if (version == 1)
    return;
  lub[10] = res[10] - minv[20];
  lub[11] = res[11] - minv[21];
  lub[12] = res[12] - minv[24];
  lub[13] = res[13] - minv[25];
  lub[14] = res[14] - minv[28];
  lub[15] = res[15] - minv[29];
  lub[16] = res[16] - minv[32];
  lub[17] = res[17] - minv[33];
  lub[18] = res[18] - minv[36];
  lub[19] = res[19] - minv[37];
  lub[20] = res[20] - minv[40];
  lub[21] = res[21] - minv[41];
}


x86 assembly (clang, -O0):
<scalars_lub_poly>:
push   %rbp
mov    %rsp,%rbp
sub    $0x250,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
mov    %rsi,-0x28(%rbp)
mov    %edx,-0x2c(%rbp)
mov    %ecx,-0x30(%rbp)
mov    %r8,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
cmpl   $0x16,-0x3c(%rbp)
jge    119a <scalars_lub_poly+0x5a>
mov    -0x38(%rbp),%rax
movslq -0x3c(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1172 <scalars_lub_poly+0x32>
mov    -0x4(%rbp),%edi
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
mov    -0x28(%rbp),%rsi
mov    -0x2c(%rbp),%edx
mov    -0x30(%rbp),%ecx
lea    -0xf0(%rbp),%r9
mov    $0x1,%r8d
call   1060 <twobody_scalars_res@plt>
cmpl   $0x0,-0x4(%rbp)
jne    11f2 <scalars_lub_poly+0xb2>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
lea    -0x250(%rbp),%rdi
call   1040 <scalars_minv_f_poly@plt>
jmp    123c <scalars_lub_poly+0xfc>
cmpl   $0x1,-0x4(%rbp)
jne    121c <scalars_lub_poly+0xdc>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
lea    -0x250(%rbp),%rdi
call   1030 <scalars_minv_ft_poly@plt>
jmp    1237 <scalars_lub_poly+0xf7>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
lea    -0x250(%rbp),%rdi
call   1050 <scalars_minv_fts_poly@plt>
jmp    123c <scalars_lub_poly+0xfc>
movsd  -0xf0(%rbp),%xmm0
ff
subsd  -0x250(%rbp),%xmm0
ff
mov    -0x38(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0xe8(%rbp),%xmm0
ff
subsd  -0x248(%rbp),%xmm0
ff
mov    -0x38(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0xe0(%rbp),%xmm0
ff
subsd  -0x230(%rbp),%xmm0
ff
mov    -0x38(%rbp),%rax
movsd  %xmm0,0x10(%rax)
movsd  -0xd8(%rbp),%xmm0
ff
subsd  -0x228(%rbp),%xmm0
ff
mov    -0x38(%rbp),%rax
movsd  %xmm0,0x18(%rax)
cmpl   $0x0,-0x4(%rbp)
jne    12ae <scalars_lub_poly+0x16e>
jmp    1479 <scalars_lub_poly+0x339>
movsd  -0xd0(%rbp),%xmm0
ff
subsd  -0x210(%rbp),%xmm0
ff
mov    -0x38(%rbp),%rax
movsd  %xmm0,0x20(%rax)
movsd  -0xc8(%rbp),%xmm0
ff
subsd  -0x208(%rbp),%xmm0
ff
mov    -0x38(%rbp),%rax
movsd  %xmm0,0x28(%rax)
movsd  -0xc0(%rbp),%xmm0
ff
subsd  -0x1f0(%rbp),%xmm0
ff
mov    -0x38(%rbp),%rax
movsd  %xmm0,0x30(%rax)
movsd  -0xb8(%rbp),%xmm0
subsd  -0x1e8(%rbp),%xmm0
ff
mov    -0x38(%rbp),%rax
movsd  %xmm0,0x38(%rax)
movsd  -0xb0(%rbp),%xmm0
ff
subsd  -0x1d0(%rbp),%xmm0
ff
mov    -0x38(%rbp),%rax
movsd  %xmm0,0x40(%rax)
movsd  -0xa8(%rbp),%xmm0
ff
subsd  -0x1c8(%rbp),%xmm0
ff
mov    -0x38(%rbp),%rax
movsd  %xmm0,0x48(%rax)
cmpl   $0x1,-0x4(%rbp)
jne    1353 <scalars_lub_poly+0x213>
jmp    1479 <scalars_lub_poly+0x339>
movsd  -0xa0(%rbp),%xmm0
ff
subsd  -0x1b0(%rbp),%xmm0
ff
mov    -0x38(%rbp),%rax
movsd  %xmm0,0x50(%rax)
movsd  -0x98(%rbp),%xmm0
ff
subsd  -0x1a8(%rbp),%xmm0
ff
mov    -0x38(%rbp),%rax
movsd  %xmm0,0x58(%rax)
movsd  -0x90(%rbp),%xmm0
ff
subsd  -0x190(%rbp),%xmm0
ff
mov    -0x38(%rbp),%rax
movsd  %xmm0,0x60(%rax)
movsd  -0x88(%rbp),%xmm0
ff
subsd  -0x188(%rbp),%xmm0
ff
mov    -0x38(%rbp),%rax
movsd  %xmm0,0x68(%rax)
movsd  -0x80(%rbp),%xmm0
subsd  -0x170(%rbp),%xmm0
ff
mov    -0x38(%rbp),%rax
movsd  %xmm0,0x70(%rax)
movsd  -0x78(%rbp),%xmm0
subsd  -0x168(%rbp),%xmm0
ff
mov    -0x38(%rbp),%rax
movsd  %xmm0,0x78(%rax)
movsd  -0x70(%rbp),%xmm0
subsd  -0x150(%rbp),%xmm0
ff
mov    -0x38(%rbp),%rax
movsd  %xmm0,0x80(%rax)
movsd  -0x68(%rbp),%xmm0
subsd  -0x148(%rbp),%xmm0
ff
mov    -0x38(%rbp),%rax
movsd  %xmm0,0x88(%rax)
movsd  -0x60(%rbp),%xmm0
subsd  -0x130(%rbp),%xmm0
ff
mov    -0x38(%rbp),%rax
movsd  %xmm0,0x90(%rax)
movsd  -0x58(%rbp),%xmm0
subsd  -0x128(%rbp),%xmm0
ff
mov    -0x38(%rbp),%rax
movsd  %xmm0,0x98(%rax)
movsd  -0x50(%rbp),%xmm0
subsd  -0x110(%rbp),%xmm0
ff
mov    -0x38(%rbp),%rax
movsd  %xmm0,0xa0(%rax)
movsd  -0x48(%rbp),%xmm0
subsd  -0x108(%rbp),%xmm0
ff
mov    -0x38(%rbp),%rax
movsd  %xmm0,0xa8(%rax)
add    $0x250,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scalars_lub_poly>:
push   %rbp
push   %rbx
sub    $0x238,%rsp
mov    %r8,%rbx
mov    %edi,%ebp
xorps  %xmm3,%xmm3
movups %xmm3,0xa0(%r8)
movups %xmm3,0x90(%r8)
movups %xmm3,0x80(%r8)
movups %xmm3,0x70(%r8)
movups %xmm3,0x60(%r8)
movups %xmm3,0x50(%r8)
movups %xmm3,0x40(%r8)
movups %xmm3,0x30(%r8)
movups %xmm3,0x20(%r8)
movups %xmm3,0x10(%r8)
movups %xmm3,(%r8)
lea    0x20(%rsp),%r9
movsd  %xmm0,0x8(%rsp)
movsd  %xmm1,0x10(%rsp)
movsd  %xmm2,0x18(%rsp)
mov    $0x1,%r8d
call   1060 <twobody_scalars_res@plt>
test   %ebp,%ebp
je     11dc <scalars_lub_poly+0x9c>
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
movsd  0x18(%rsp),%xmm2
lea    0xd0(%rsp),%rdi
cmp    $0x1,%ebp
jne    11fd <scalars_lub_poly+0xbd>
call   1030 <scalars_minv_ft_poly@plt>
jmp    1202 <scalars_lub_poly+0xc2>
lea    0xd0(%rsp),%rdi
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
movsd  0x18(%rsp),%xmm2
call   1040 <scalars_minv_f_poly@plt>
jmp    1202 <scalars_lub_poly+0xc2>
call   1050 <scalars_minv_fts_poly@plt>
movapd 0x20(%rsp),%xmm0
subpd  0xd0(%rsp),%xmm0
movupd %xmm0,(%rbx)
movapd 0x30(%rsp),%xmm0
subpd  0xf0(%rsp),%xmm0
movupd %xmm0,0x10(%rbx)
test   %ebp,%ebp
je     1306 <scalars_lub_poly+0x1c6>
movapd 0x40(%rsp),%xmm0
subpd  0x110(%rsp),%xmm0
movupd %xmm0,0x20(%rbx)
movapd 0x50(%rsp),%xmm0
subpd  0x130(%rsp),%xmm0
movupd %xmm0,0x30(%rbx)
movapd 0x60(%rsp),%xmm0
subpd  0x150(%rsp),%xmm0
movupd %xmm0,0x40(%rbx)
cmp    $0x1,%ebp
je     1306 <scalars_lub_poly+0x1c6>
movapd 0x70(%rsp),%xmm0
subpd  0x170(%rsp),%xmm0
movupd %xmm0,0x50(%rbx)
movapd 0x80(%rsp),%xmm0
subpd  0x190(%rsp),%xmm0
movupd %xmm0,0x60(%rbx)
movapd 0x90(%rsp),%xmm0
subpd  0x1b0(%rsp),%xmm0
movupd %xmm0,0x70(%rbx)
movapd 0xa0(%rsp),%xmm0
subpd  0x1d0(%rsp),%xmm0
movupd %xmm0,0x80(%rbx)
movapd 0xb0(%rsp),%xmm0
subpd  0x1f0(%rsp),%xmm0
movupd %xmm0,0x90(%rbx)
movapd 0xc0(%rsp),%xmm0
subpd  0x210(%rsp),%xmm0
movupd %xmm0,0xa0(%rbx)
add    $0x238,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.twobody_f = type { i32 }
define void @scalars_lub_poly(i32 %0, double %1, double %2, double %3, %struct.twobody_f* %4, i32 %5, i32 %6, double* %7) {
%9 = alloca i32
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca %struct.twobody_f*
%14 = alloca i32
%15 = alloca i32
%16 = alloca double*
%17 = alloca i32
%18 = alloca [22 x double]
%19 = alloca [44 x double]
store i32 %0, i32* %9
store double %1, double* %10
store double %2, double* %11
store double %3, double* %12
store %struct.twobody_f* %4, %struct.twobody_f** %13
store i32 %5, i32* %14
store i32 %6, i32* %15
store double* %7, double** %16
store i32 0, i32* %17
br label %20
20: ; preds = %28, %8
%21 = load i32, i32* %17
%22 = icmp slt i32 %21, 22
br i1 %22, label %23, label %31
23: ; preds = %20
%24 = load double*, double** %16
%25 = load i32, i32* %17
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds double, double* %24, i64 %26
store double 0.000000e+00, double* %27
br label %28
28: ; preds = %23
%29 = load i32, i32* %17
%30 = add nsw i32 %29, 1
store i32 %30, i32* %17
br label %20
31: ; preds = %20
%32 = load i32, i32* %9
%33 = load double, double* %10
%34 = load double, double* %11
%35 = load double, double* %12
%36 = load %struct.twobody_f*, %struct.twobody_f** %13
%37 = load i32, i32* %14
%38 = load i32, i32* %15
%39 = getelementptr inbounds [22 x double], [22 x double]* %18, i64 0, i64 0
%40 = call i32 @twobody_scalars_res(i32 %32, double %33, double %34, double %35, %struct.twobody_f* %36, i32 %37, i32 %38, i32 1, double* %39)
%41 = load i32, i32* %9
%42 = icmp eq i32 %41, 0
br i1 %42, label %43, label %49
43: ; preds = %31
%44 = load double, double* %10
%45 = load double, double* %11
%46 = load double, double* %12
%47 = getelementptr inbounds [44 x double], [44 x double]* %19, i64 0, i64 0
%48 = call i32 @scalars_minv_f_poly(double %44, double %45, double %46, double* %47)
br label %65
49: ; preds = %31
%50 = load i32, i32* %9
%51 = icmp eq i32 %50, 1
br i1 %51, label %52, label %58
52: ; preds = %49
%53 = load double, double* %10
%54 = load double, double* %11
%55 = load double, double* %12
%56 = getelementptr inbounds [44 x double], [44 x double]* %19, i64 0, i64 0
%57 = call i32 @scalars_minv_ft_poly(double %53, double %54, double %55, double* %56)
br label %64
58: ; preds = %49
%59 = load double, double* %10
%60 = load double, double* %11
%61 = load double, double* %12
%62 = getelementptr inbounds [44 x double], [44 x double]* %19, i64 0, i64 0
%63 = call i32 @scalars_minv_fts_poly(double %59, double %60, double %61, double* %62)
br label %64
64: ; preds = %58, %52
br label %65
65: ; preds = %64, %43
%66 = getelementptr inbounds [22 x double], [22 x double]* %18, i64 0, i64 0
%67 = load double, double* %66
%68 = getelementptr inbounds [44 x double], [44 x double]* %19, i64 0, i64 0
%69 = load double, double* %68
%70 = fsub double %67, %69
%71 = load double*, double** %16
%72 = getelementptr inbounds double, double* %71, i64 0
store double %70, double* %72
%73 = getelementptr inbounds [22 x double], [22 x double]* %18, i64 0, i64 1
%74 = load double, double* %73
%75 = getelementptr inbounds [44 x double], [44 x double]* %19, i64 0, i64 1
%76 = load double, double* %75
%77 = fsub double %74, %76
%78 = load double*, double** %16
%79 = getelementptr inbounds double, double* %78, i64 1
store double %77, double* %79
%80 = getelementptr inbounds [22 x double], [22 x double]* %18, i64 0, i64 2
%81 = load double, double* %80
%82 = getelementptr inbounds [44 x double], [44 x double]* %19, i64 0, i64 4
%83 = load double, double* %82
%84 = fsub double %81, %83
%85 = load double*, double** %16
%86 = getelementptr inbounds double, double* %85, i64 2
store double %84, double* %86
%87 = getelementptr inbounds [22 x double], [22 x double]* %18, i64 0, i64 3
%88 = load double, double* %87
%89 = getelementptr inbounds [44 x double], [44 x double]* %19, i64 0, i64 5
%90 = load double, double* %89
%91 = fsub double %88, %90
%92 = load double*, double** %16
%93 = getelementptr inbounds double, double* %92, i64 3
store double %91, double* %93
%94 = load i32, i32* %9
%95 = icmp eq i32 %94, 0
br i1 %95, label %96, label %97
96: ; preds = %65
br label %228
97: ; preds = %65
%98 = getelementptr inbounds [22 x double], [22 x double]* %18, i64 0, i64 4
%99 = load double, double* %98
%100 = getelementptr inbounds [44 x double], [44 x double]* %19, i64 0, i64 8
%101 = load double, double* %100
%102 = fsub double %99, %101
%103 = load double*, double** %16
%104 = getelementptr inbounds double, double* %103, i64 4
store double %102, double* %104
%105 = getelementptr inbounds [22 x double], [22 x double]* %18, i64 0, i64 5
%106 = load double, double* %105
%107 = getelementptr inbounds [44 x double], [44 x double]* %19, i64 0, i64 9
%108 = load double, double* %107
%109 = fsub double %106, %108
%110 = load double*, double** %16
%111 = getelementptr inbounds double, double* %110, i64 5
store double %109, double* %111
%112 = getelementptr inbounds [22 x double], [22 x double]* %18, i64 0, i64 6
%113 = load double, double* %112
%114 = getelementptr inbounds [44 x double], [44 x double]* %19, i64 0, i64 12
%115 = load double, double* %114
%116 = fsub double %113, %115
%117 = load double*, double** %16
%118 = getelementptr inbounds double, double* %117, i64 6
store double %116, double* %118
%119 = getelementptr inbounds [22 x double], [22 x double]* %18, i64 0, i64 7
%120 = load double, double* %119
%121 = getelementptr inbounds [44 x double], [44 x double]* %19, i64 0, i64 13
%122 = load double, double* %121
%123 = fsub double %120, %122
%124 = load double*, double** %16
%125 = getelementptr inbounds double, double* %124, i64 7
store double %123, double* %125
%126 = getelementptr inbounds [22 x double], [22 x double]* %18, i64 0, i64 8
%127 = load double, double* %126
%128 = getelementptr inbounds [44 x double], [44 x double]* %19, i64 0, i64 16
%129 = load double, double* %128
%130 = fsub double %127, %129
%131 = load double*, double** %16
%132 = getelementptr inbounds double, double* %131, i64 8
store double %130, double* %132
%133 = getelementptr inbounds [22 x double], [22 x double]* %18, i64 0, i64 9
%134 = load double, double* %133
%135 = getelementptr inbounds [44 x double], [44 x double]* %19, i64 0, i64 17
%136 = load double, double* %135
%137 = fsub double %134, %136
%138 = load double*, double** %16
%139 = getelementptr inbounds double, double* %138, i64 9
store double %137, double* %139
%140 = load i32, i32* %9
%141 = icmp eq i32 %140, 1
br i1 %141, label %142, label %143
142: ; preds = %97
br label %228
143: ; preds = %97
%144 = getelementptr inbounds [22 x double], [22 x double]* %18, i64 0, i64 10
%145 = load double, double* %144
%146 = getelementptr inbounds [44 x double], [44 x double]* %19, i64 0, i64 20
%147 = load double, double* %146
%148 = fsub double %145, %147
%149 = load double*, double** %16
%150 = getelementptr inbounds double, double* %149, i64 10
store double %148, double* %150
%151 = getelementptr inbounds [22 x double], [22 x double]* %18, i64 0, i64 11
%152 = load double, double* %151
%153 = getelementptr inbounds [44 x double], [44 x double]* %19, i64 0, i64 21
%154 = load double, double* %153
%155 = fsub double %152, %154
%156 = load double*, double** %16
%157 = getelementptr inbounds double, double* %156, i64 11
store double %155, double* %157
%158 = getelementptr inbounds [22 x double], [22 x double]* %18, i64 0, i64 12
%159 = load double, double* %158
%160 = getelementptr inbounds [44 x double], [44 x double]* %19, i64 0, i64 24
%161 = load double, double* %160
%162 = fsub double %159, %161
%163 = load double*, double** %16
%164 = getelementptr inbounds double, double* %163, i64 12
store double %162, double* %164
%165 = getelementptr inbounds [22 x double], [22 x double]* %18, i64 0, i64 13
%166 = load double, double* %165
%167 = getelementptr inbounds [44 x double], [44 x double]* %19, i64 0, i64 25
%168 = load double, double* %167
%169 = fsub double %166, %168
%170 = load double*, double** %16
%171 = getelementptr inbounds double, double* %170, i64 13
store double %169, double* %171
%172 = getelementptr inbounds [22 x double], [22 x double]* %18, i64 0, i64 14
%173 = load double, double* %172
%174 = getelementptr inbounds [44 x double], [44 x double]* %19, i64 0, i64 28
%175 = load double, double* %174
%176 = fsub double %173, %175
%177 = load double*, double** %16
%178 = getelementptr inbounds double, double* %177, i64 14
store double %176, double* %178
%179 = getelementptr inbounds [22 x double], [22 x double]* %18, i64 0, i64 15
%180 = load double, double* %179
%181 = getelementptr inbounds [44 x double], [44 x double]* %19, i64 0, i64 29
%182 = load double, double* %181
%183 = fsub double %180, %182
%184 = load double*, double** %16
%185 = getelementptr inbounds double, double* %184, i64 15
store double %183, double* %185
%186 = getelementptr inbounds [22 x double], [22 x double]* %18, i64 0, i64 16
%187 = load double, double* %186
%188 = getelementptr inbounds [44 x double], [44 x double]* %19, i64 0, i64 32
%189 = load double, double* %188
%190 = fsub double %187, %189
%191 = load double*, double** %16
%192 = getelementptr inbounds double, double* %191, i64 16
store double %190, double* %192
%193 = getelementptr inbounds [22 x double], [22 x double]* %18, i64 0, i64 17
%194 = load double, double* %193
%195 = getelementptr inbounds [44 x double], [44 x double]* %19, i64 0, i64 33
%196 = load double, double* %195
%197 = fsub double %194, %196
%198 = load double*, double** %16
%199 = getelementptr inbounds double, double* %198, i64 17
store double %197, double* %199
%200 = getelementptr inbounds [22 x double], [22 x double]* %18, i64 0, i64 18
%201 = load double, double* %200
%202 = getelementptr inbounds [44 x double], [44 x double]* %19, i64 0, i64 36
%203 = load double, double* %202
%204 = fsub double %201, %203
%205 = load double*, double** %16
%206 = getelementptr inbounds double, double* %205, i64 18
store double %204, double* %206
%207 = getelementptr inbounds [22 x double], [22 x double]* %18, i64 0, i64 19
%208 = load double, double* %207
%209 = getelementptr inbounds [44 x double], [44 x double]* %19, i64 0, i64 37
%210 = load double, double* %209
%211 = fsub double %208, %210
%212 = load double*, double** %16
%213 = getelementptr inbounds double, double* %212, i64 19
store double %211, double* %213
%214 = getelementptr inbounds [22 x double], [22 x double]* %18, i64 0, i64 20
%215 = load double, double* %214
%216 = getelementptr inbounds [44 x double], [44 x double]* %19, i64 0, i64 40
%217 = load double, double* %216
%218 = fsub double %215, %217
%219 = load double*, double** %16
%220 = getelementptr inbounds double, double* %219, i64 20
store double %218, double* %220
%221 = getelementptr inbounds [22 x double], [22 x double]* %18, i64 0, i64 21
%222 = load double, double* %221
%223 = getelementptr inbounds [44 x double], [44 x double]* %19, i64 0, i64 41
%224 = load double, double* %223
%225 = fsub double %222, %224
%226 = load double*, double** %16
%227 = getelementptr inbounds double, double* %226, i64 21
store double %225, double* %227
br label %228
228: ; preds = %143, %142, %96
ret void
}

LLVM IR (-O2):
%struct.twobody_f = type { i32 }
define void @scalars_lub_poly(i32 %0, double %1, double %2, double %3, %struct.twobody_f* %4, i32 %5, i32 %6, double* writeonly %7) {
%9 = bitcast double* %7 to i8*
%10 = alloca [22 x double]
%11 = alloca [44 x double]
%12 = bitcast [22 x double]* %10 to i8*
%13 = getelementptr inbounds [22 x double], [22 x double]* %10, i64 0, i64 0
%14 = call i32 @twobody_scalars_res(i32 %0, double %1, double %2, double %3, %struct.twobody_f* %4, i32 %5, i32 %6, i32 1, double* %13)
%15 = bitcast [44 x double]* %11 to i8*
%16 = icmp eq i32 %0, 0
br i1 %16, label %17, label %20
17: ; preds = %8
%18 = getelementptr inbounds [44 x double], [44 x double]* %11, i64 0, i64 0
%19 = call i32 @scalars_minv_f_poly(double %1, double %2, double %3, double* %18)
br label %27
20: ; preds = %8
%21 = icmp eq i32 %0, 1
%22 = getelementptr inbounds [44 x double], [44 x double]* %11, i64 0, i64 0
br i1 %21, label %23, label %25
23: ; preds = %20
%24 = call i32 @scalars_minv_ft_poly(double %1, double %2, double %3, double* %22)
br label %27
25: ; preds = %20
%26 = call i32 @scalars_minv_fts_poly(double %1, double %2, double %3, double* %22)
br label %27
27: ; preds = %23, %25, %17
%28 = bitcast [22 x double]* %10 to <2 x double>*
%29 = load <2 x double>, <2 x double>* %28
%30 = bitcast [44 x double]* %11 to <2 x double>*
%31 = load <2 x double>, <2 x double>* %30
%32 = fsub <2 x double> %29, %31
%33 = bitcast double* %7 to <2 x double>*
store <2 x double> %32, <2 x double>* %33
%34 = getelementptr inbounds [22 x double], [22 x double]* %10, i64 0, i64 2
%35 = getelementptr inbounds [44 x double], [44 x double]* %11, i64 0, i64 4
%36 = getelementptr inbounds double, double* %7, i64 2
%37 = bitcast double* %34 to <2 x double>*
%38 = load <2 x double>, <2 x double>* %37
%39 = bitcast double* %35 to <2 x double>*
%40 = load <2 x double>, <2 x double>* %39
%41 = fsub <2 x double> %38, %40
%42 = bitcast double* %36 to <2 x double>*
store <2 x double> %41, <2 x double>* %42
br i1 %16, label %127, label %43
43: ; preds = %27
%44 = getelementptr inbounds [22 x double], [22 x double]* %10, i64 0, i64 4
%45 = getelementptr inbounds [44 x double], [44 x double]* %11, i64 0, i64 8
%46 = getelementptr inbounds double, double* %7, i64 4
%47 = bitcast double* %44 to <2 x double>*
%48 = load <2 x double>, <2 x double>* %47
%49 = bitcast double* %45 to <2 x double>*
%50 = load <2 x double>, <2 x double>* %49
%51 = fsub <2 x double> %48, %50
%52 = bitcast double* %46 to <2 x double>*
store <2 x double> %51, <2 x double>* %52
%53 = getelementptr inbounds [22 x double], [22 x double]* %10, i64 0, i64 6
%54 = getelementptr inbounds [44 x double], [44 x double]* %11, i64 0, i64 12
%55 = getelementptr inbounds double, double* %7, i64 6
%56 = bitcast double* %53 to <2 x double>*
%57 = load <2 x double>, <2 x double>* %56
%58 = bitcast double* %54 to <2 x double>*
%59 = load <2 x double>, <2 x double>* %58
%60 = fsub <2 x double> %57, %59
%61 = bitcast double* %55 to <2 x double>*
store <2 x double> %60, <2 x double>* %61
%62 = getelementptr inbounds [22 x double], [22 x double]* %10, i64 0, i64 8
%63 = getelementptr inbounds [44 x double], [44 x double]* %11, i64 0, i64 16
%64 = getelementptr inbounds double, double* %7, i64 8
%65 = bitcast double* %62 to <2 x double>*
%66 = load <2 x double>, <2 x double>* %65
%67 = bitcast double* %63 to <2 x double>*
%68 = load <2 x double>, <2 x double>* %67
%69 = fsub <2 x double> %66, %68
%70 = bitcast double* %64 to <2 x double>*
store <2 x double> %69, <2 x double>* %70
%71 = icmp eq i32 %0, 1
br i1 %71, label %127, label %72
72: ; preds = %43
%73 = getelementptr inbounds [22 x double], [22 x double]* %10, i64 0, i64 10
%74 = getelementptr inbounds [44 x double], [44 x double]* %11, i64 0, i64 20
%75 = getelementptr inbounds double, double* %7, i64 10
%76 = bitcast double* %73 to <2 x double>*
%77 = load <2 x double>, <2 x double>* %76
%78 = bitcast double* %74 to <2 x double>*
%79 = load <2 x double>, <2 x double>* %78
%80 = fsub <2 x double> %77, %79
%81 = bitcast double* %75 to <2 x double>*
store <2 x double> %80, <2 x double>* %81
%82 = getelementptr inbounds [22 x double], [22 x double]* %10, i64 0, i64 12
%83 = getelementptr inbounds [44 x double], [44 x double]* %11, i64 0, i64 24
%84 = getelementptr inbounds double, double* %7, i64 12
%85 = bitcast double* %82 to <2 x double>*
%86 = load <2 x double>, <2 x double>* %85
%87 = bitcast double* %83 to <2 x double>*
%88 = load <2 x double>, <2 x double>* %87
%89 = fsub <2 x double> %86, %88
%90 = bitcast double* %84 to <2 x double>*
store <2 x double> %89, <2 x double>* %90
%91 = getelementptr inbounds [22 x double], [22 x double]* %10, i64 0, i64 14
%92 = getelementptr inbounds [44 x double], [44 x double]* %11, i64 0, i64 28
%93 = getelementptr inbounds double, double* %7, i64 14
%94 = bitcast double* %91 to <2 x double>*
%95 = load <2 x double>, <2 x double>* %94
%96 = bitcast double* %92 to <2 x double>*
%97 = load <2 x double>, <2 x double>* %96
%98 = fsub <2 x double> %95, %97
%99 = bitcast double* %93 to <2 x double>*
store <2 x double> %98, <2 x double>* %99
%100 = getelementptr inbounds [22 x double], [22 x double]* %10, i64 0, i64 16
%101 = getelementptr inbounds [44 x double], [44 x double]* %11, i64 0, i64 32
%102 = getelementptr inbounds double, double* %7, i64 16
%103 = bitcast double* %100 to <2 x double>*
%104 = load <2 x double>, <2 x double>* %103
%105 = bitcast double* %101 to <2 x double>*
%106 = load <2 x double>, <2 x double>* %105
%107 = fsub <2 x double> %104, %106
%108 = bitcast double* %102 to <2 x double>*
store <2 x double> %107, <2 x double>* %108
%109 = getelementptr inbounds [22 x double], [22 x double]* %10, i64 0, i64 18
%110 = getelementptr inbounds [44 x double], [44 x double]* %11, i64 0, i64 36
%111 = getelementptr inbounds double, double* %7, i64 18
%112 = bitcast double* %109 to <2 x double>*
%113 = load <2 x double>, <2 x double>* %112
%114 = bitcast double* %110 to <2 x double>*
%115 = load <2 x double>, <2 x double>* %114
%116 = fsub <2 x double> %113, %115
%117 = bitcast double* %111 to <2 x double>*
store <2 x double> %116, <2 x double>* %117
%118 = getelementptr inbounds [22 x double], [22 x double]* %10, i64 0, i64 20
%119 = getelementptr inbounds [44 x double], [44 x double]* %11, i64 0, i64 40
%120 = getelementptr inbounds double, double* %7, i64 20
%121 = bitcast double* %118 to <2 x double>*
%122 = load <2 x double>, <2 x double>* %121
%123 = bitcast double* %119 to <2 x double>*
%124 = load <2 x double>, <2 x double>* %123
%125 = fsub <2 x double> %122, %124
%126 = bitcast double* %120 to <2 x double>*
store <2 x double> %125, <2 x double>* %126
br label %127
127: ; preds = %43, %27, %72
ret void
}