user: What would the C source look like for the assembly code provided here:

```asm
<scalars_lub_poly_full>:
  endbr64
  push   %r14
  mov    %rdx,%r14
  push   %r13
  mov    %r8d,%r13d
  mov    $0x1,%r8d
  push   %r12
  mov    %ecx,%r12d
  mov    %r9,%rcx
  push   %rbp
  mov    %edi,%ebp
  lea    0x8(%r9),%rdi
  mov    %r12d,%edx
  push   %rbx
  and    $0xfffffffffffffff8,%rdi
  mov    %r9,%rbx
  sub    %rdi,%rcx
  add    $0x160,%ecx
  sub    $0x2f0,%rsp
  shr    $0x3,%ecx
  mov    %fs:0x28,%rax
  mov    %rax,0x2e8(%rsp)
  xor    %eax,%eax
  movq   $0x0,(%r9)
  movq   $0x0,0x158(%r9)
  lea    0x20(%rsp),%r9
  rep stos %rax,%es:(%rdi)
  mov    %r13d,%ecx
  mov    %ebp,%edi
  mov    $0x3,%eax
  movsd  %xmm2,0x18(%rsp)
  movsd  %xmm1,0x8(%rsp)
  movsd  %xmm0,(%rsp)
  call   <twobody_scalars_res@plt>
  movsd  0x8(%rsp),%xmm3
  mov    %ebp,%edi
  mov    %r13d,%ecx
  movsd  (%rsp),%xmm0
  mov    %r12d,%edx
  mov    %r14,%rsi
  mov    $0x3,%eax
  movsd  0x18(%rsp),%xmm4
  movapd %xmm3,%xmm2
  lea    0xd0(%rsp),%r9
  mov    $0x1,%r8d
  movsd  %xmm3,0x10(%rsp)
  movapd %xmm4,%xmm1
  movsd  %xmm4,0x8(%rsp)
  call   <twobody_scalars_res@plt>
  movsd  0x8(%rsp),%xmm4
  movsd  0x10(%rsp),%xmm3
  test   %ebp,%ebp
  movsd  (%rsp),%xmm0
  lea    0x180(%rsp),%rdi
  mov    $0x3,%eax
  movapd %xmm4,%xmm2
  movapd %xmm3,%xmm1
  je     L66
  cmp    $0x1,%ebp
  je     L0
  call   <scalars_minv_fts_poly@plt>
L8:
  movsd  0x20(%rsp),%xmm0
  subsd  0x180(%rsp),%xmm0
  movsd  %xmm0,(%rbx)
  movsd  0x28(%rsp),%xmm0
  subsd  0x188(%rsp),%xmm0
  movsd  %xmm0,0x8(%rbx)
  movsd  0xd8(%rsp),%xmm0
  subsd  0x190(%rsp),%xmm0
  movsd  %xmm0,0x10(%rbx)
  movsd  0xd0(%rsp),%xmm0
  subsd  0x198(%rsp),%xmm0
  movsd  %xmm0,0x18(%rbx)
  movsd  0x30(%rsp),%xmm0
  subsd  0x1a0(%rsp),%xmm0
  movsd  %xmm0,0x20(%rbx)
  movsd  0x38(%rsp),%xmm0
  subsd  0x1a8(%rsp),%xmm0
  movsd  %xmm0,0x28(%rbx)
  movsd  0xe8(%rsp),%xmm0
  subsd  0x1b0(%rsp),%xmm0
  movsd  %xmm0,0x30(%rbx)
  movsd  0xe0(%rsp),%xmm0
  subsd  0x1b8(%rsp),%xmm0
  movsd  %xmm0,0x38(%rbx)
  test   %ebp,%ebp
  je     L39
  movsd  0x40(%rsp),%xmm0
  subsd  0x1c0(%rsp),%xmm0
  movsd  %xmm0,0x40(%rbx)
  movsd  0x48(%rsp),%xmm0
  subsd  0x1c8(%rsp),%xmm0
  movsd  %xmm0,0x48(%rbx)
  movsd  0xf8(%rsp),%xmm0
  subsd  0x1d0(%rsp),%xmm0
  movsd  %xmm0,0x50(%rbx)
  movsd  0xf0(%rsp),%xmm0
  subsd  0x1d8(%rsp),%xmm0
  movsd  %xmm0,0x58(%rbx)
  movsd  0x50(%rsp),%xmm0
  subsd  0x1e0(%rsp),%xmm0
  movsd  %xmm0,0x60(%rbx)
  movsd  0x58(%rsp),%xmm0
  subsd  0x1e8(%rsp),%xmm0
  movsd  %xmm0,0x68(%rbx)
  movsd  0x108(%rsp),%xmm0
  subsd  0x1f0(%rsp),%xmm0
  movsd  %xmm0,0x70(%rbx)
  movsd  0x100(%rsp),%xmm0
  subsd  0x1f8(%rsp),%xmm0
  movsd  %xmm0,0x78(%rbx)
  movsd  0x60(%rsp),%xmm0
  subsd  0x200(%rsp),%xmm0
  movsd  %xmm0,0x80(%rbx)
  movsd  0x68(%rsp),%xmm0
  subsd  0x208(%rsp),%xmm0
  movsd  %xmm0,0x88(%rbx)
  movsd  0x118(%rsp),%xmm0
  subsd  0x210(%rsp),%xmm0
  movsd  %xmm0,0x90(%rbx)
  movsd  0x110(%rsp),%xmm0
  subsd  0x218(%rsp),%xmm0
  movsd  %xmm0,0x98(%rbx)
  cmp    $0x1,%ebp
  je     L39
  movsd  0x70(%rsp),%xmm0
  subsd  0x220(%rsp),%xmm0
  movsd  %xmm0,0xa0(%rbx)
  movsd  0x78(%rsp),%xmm0
  subsd  0x228(%rsp),%xmm0
  movsd  %xmm0,0xa8(%rbx)
  movsd  0x128(%rsp),%xmm0
  subsd  0x230(%rsp),%xmm0
  movsd  %xmm0,0xb0(%rbx)
  movsd  0x120(%rsp),%xmm0
  subsd  0x238(%rsp),%xmm0
  movsd  %xmm0,0xb8(%rbx)
  movsd  0x80(%rsp),%xmm0
  subsd  0x240(%rsp),%xmm0
  movsd  %xmm0,0xc0(%rbx)
  movsd  0x88(%rsp),%xmm0
  subsd  0x248(%rsp),%xmm0
  movsd  %xmm0,0xc8(%rbx)
  movsd  0x138(%rsp),%xmm0
  subsd  0x250(%rsp),%xmm0
  movsd  %xmm0,0xd0(%rbx)
  movsd  0x130(%rsp),%xmm0
  subsd  0x258(%rsp),%xmm0
  movsd  %xmm0,0xd8(%rbx)
  movsd  0x90(%rsp),%xmm0
  subsd  0x260(%rsp),%xmm0
  movsd  %xmm0,0xe0(%rbx)
  movsd  0x98(%rsp),%xmm0
  subsd  0x268(%rsp),%xmm0
  movsd  %xmm0,0xe8(%rbx)
  movsd  0x148(%rsp),%xmm0
  subsd  0x270(%rsp),%xmm0
  movsd  %xmm0,0xf0(%rbx)
  movsd  0x140(%rsp),%xmm0
  subsd  0x278(%rsp),%xmm0
  movsd  %xmm0,0xf8(%rbx)
  movsd  0xa0(%rsp),%xmm0
  subsd  0x280(%rsp),%xmm0
  movsd  %xmm0,0x100(%rbx)
  movsd  0xa8(%rsp),%xmm0
  subsd  0x288(%rsp),%xmm0
  movsd  %xmm0,0x108(%rbx)
  movsd  0x158(%rsp),%xmm0
  subsd  0x290(%rsp),%xmm0
  movsd  %xmm0,0x110(%rbx)
  movsd  0x150(%rsp),%xmm0
  subsd  0x298(%rsp),%xmm0
  movsd  %xmm0,0x118(%rbx)
  movsd  0xb0(%rsp),%xmm0
  subsd  0x2a0(%rsp),%xmm0
  movsd  %xmm0,0x120(%rbx)
  movsd  0xb8(%rsp),%xmm0
  subsd  0x2a8(%rsp),%xmm0
  movsd  %xmm0,0x128(%rbx)
  movsd  0x168(%rsp),%xmm0
  subsd  0x2b0(%rsp),%xmm0
  movsd  %xmm0,0x130(%rbx)
  movsd  0x160(%rsp),%xmm0
  subsd  0x2b8(%rsp),%xmm0
  movsd  %xmm0,0x138(%rbx)
  movsd  0xc0(%rsp),%xmm0
  subsd  0x2c0(%rsp),%xmm0
  movsd  %xmm0,0x140(%rbx)
  movsd  0xc8(%rsp),%xmm0
  subsd  0x2c8(%rsp),%xmm0
  movsd  %xmm0,0x148(%rbx)
  movsd  0x178(%rsp),%xmm0
  subsd  0x2d0(%rsp),%xmm0
  movsd  %xmm0,0x150(%rbx)
  movsd  0x170(%rsp),%xmm0
  subsd  0x2d8(%rsp),%xmm0
  movsd  %xmm0,0x158(%rbx)
L39:
  mov    0x2e8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L32
  add    $0x2f0,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L0:
  call   <scalars_minv_ft_poly@plt>
  jmp    L8
L66:
  call   <scalars_minv_f_poly@plt>
  jmp    L8
L32:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void scalars_lub_poly_full(int version, double r, double a1, double a2, struct twobody_f *f12, struct twobody_f *f21, int n, int flag_lub, double *lub) {
  int i;
  for (i = 0; i < 44; i++) {
    lub[i] = 0.0;
  }
  double res12[22];
  twobody_scalars_res(version, r, a1, a2, f12, n, flag_lub, 1, res12);
  double res21[22];
  twobody_scalars_res(version, r, a2, a1, f21, n, flag_lub, 1, res21);
  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] = res12[0] - minv[0];
  lub[1] = res12[1] - minv[1];
  lub[2] = res21[1] - minv[2];
  lub[3] = res21[0] - minv[3];
  lub[4] = res12[2] - minv[4];
  lub[5] = res12[3] - minv[5];
  lub[6] = res21[3] - minv[6];
  lub[7] = res21[2] - minv[7];
  if (version == 0)
    return;
  lub[8] = res12[4] - minv[8];
  lub[9] = res12[5] - minv[9];
  lub[10] = res21[5] - minv[10];
  lub[11] = res21[4] - minv[11];
  lub[12] = res12[6] - minv[12];
  lub[13] = res12[7] - minv[13];
  lub[14] = res21[7] - minv[14];
  lub[15] = res21[6] - minv[15];
  lub[16] = res12[8] - minv[16];
  lub[17] = res12[9] - minv[17];
  lub[18] = res21[9] - minv[18];
  lub[19] = res21[8] - minv[19];
  if (version == 1)
    return;
  lub[20] = res12[10] - minv[20];
  lub[21] = res12[11] - minv[21];
  lub[22] = res21[11] - minv[22];
  lub[23] = res21[10] - minv[23];
  lub[24] = res12[12] - minv[24];
  lub[25] = res12[13] - minv[25];
  lub[26] = res21[13] - minv[26];
  lub[27] = res21[12] - minv[27];
  lub[28] = res12[14] - minv[28];
  lub[29] = res12[15] - minv[29];
  lub[30] = res21[15] - minv[30];
  lub[31] = res21[14] - minv[31];
  lub[32] = res12[16] - minv[32];
  lub[33] = res12[17] - minv[33];
  lub[34] = res21[17] - minv[34];
  lub[35] = res21[16] - minv[35];
  lub[36] = res12[18] - minv[36];
  lub[37] = res12[19] - minv[37];
  lub[38] = res21[19] - minv[38];
  lub[39] = res21[18] - minv[39];
  lub[40] = res12[20] - minv[40];
  lub[41] = res12[21] - minv[41];
  lub[42] = res21[21] - minv[42];
  lub[43] = res21[20] - minv[43];
}
```