user: Please show me the C implementation that matches the assembly code listed below:

```asm
<test_FKinSpace>:
  endbr64
  push   %r14
  lea    D117(%rip),%rsi
  mov    $0x24,%ecx
  push   %r13
  push   %r12
  lea    D98(%rip),%r12
  push   %rbp
  push   %rbx
  sub    $0x260,%rsp
  movq   D71(%rip),%xmm0
  movapd D96(%rip),%xmm1
  mov    %fs:0x28,%rax
  mov    %rax,0x258(%rsp)
  xor    %eax,%eax
  movapd D81(%rip),%xmm2
  mov    %rsp,%r14
  lea    0x30(%rsp),%rbp
  movaps %xmm0,0x30(%rsp)
  movapd D7(%rip),%xmm0
  lea    0x130(%rsp),%r13
  mov    %r14,%rbx
  movaps %xmm1,0x60(%rsp)
  mov    %r13,%rdi
  pxor   %xmm1,%xmm1
  rep movsq %ds:(%rsi),%es:(%rdi)
  movaps %xmm0,0x40(%rsp)
  movapd D47(%rip),%xmm0
  lea    D46(%rip),%rdi
  movaps %xmm1,0x70(%rsp)
  movaps %xmm0,0x50(%rsp)
  movaps %xmm0,0xa0(%rsp)
  movapd D120(%rip),%xmm0
  movaps %xmm2,0x80(%rsp)
  movaps %xmm0,(%rsp)
  movapd D9(%rip),%xmm0
  movaps %xmm1,0x90(%rsp)
  movaps %xmm0,0x10(%rsp)
  movapd D107(%rip),%xmm0
  movaps %xmm0,0x20(%rsp)
  call   <puts@plt>
  nopl   0x0(%rax)
L14:
  movsd  (%rbx),%xmm0
  mov    %r12,%rdi
  mov    $0x1,%eax
  add    $0x8,%rbx
  call   <printf@plt>
  cmp    %rbx,%rbp
  jne    L14
  mov    $0xa,%edi
  lea    0xb0(%rsp),%rbx
  lea    0x130(%rsp),%r12
  call   <putchar@plt>
  mov    %rbp,%rdi
  mov    %rbx,%r8
  mov    %r14,%rcx
  mov    %r13,%rdx
  mov    $0x6,%esi
  lea    D128(%rip),%rbp
  call   <FKinSpace@plt>
  lea    D86(%rip),%rdi
  call   <puts@plt>
L27:
  movsd  0x18(%rbx),%xmm3
  movsd  (%rbx),%xmm0
  mov    %rbp,%rdi
  add    $0x20,%rbx
  movsd  -0x10(%rbx),%xmm2
  movsd  -0x18(%rbx),%xmm1
  mov    $0x4,%eax
  call   <printf@plt>
  cmp    %rbx,%r12
  jne    L27
  mov    0x258(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L6
  add    $0x260,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L6:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_label: D117
datatype: string
name: read_data
arguments: data_label: D98
datatype: string
name: read_data
arguments: data_label: D71
datatype: f64
name: read_data
arguments: data_label: D96
datatype: byte[16]
name: read_data
arguments: data_label: D81
datatype: f64[2]
name: read_data
arguments: data_label: D7
datatype: byte[16]
name: read_data
arguments: data_label: D47
datatype: byte[16]
name: read_data
arguments: data_label: D46
datatype: string
name: read_data
arguments: data_label: D120
datatype: f64[2]
name: read_data
arguments: data_label: D9
datatype: f64[2]
name: read_data
arguments: data_label: D107
datatype: f64[2]
name: read_data
arguments: data_label: D128
datatype: string
name: read_data
arguments: data_label: D86
datatype: string

tool: 

tool: D98: %lf 

tool: D71: 1

tool: {"D96": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xcd,0xcc,0xcc,0xcc,0xcc,0xbc,0x70,0x40]}

tool: {"D81": [1.0,478.95]}

tool: {"D7": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x6a,0x40]}

tool: {"D47": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x3f]}

tool: D46: thetalist:

tool: {"D120": [0.1,0.2]}

tool: {"D9": [0.3,0.4]}

tool: {"D107": [0.5,0.7853981633974483]}

tool: D128: %lf %lf %lf %lf


tool: D86: T:

assistant: ```c
void test_FKinSpace() {
  int i;
  double M[4][4] = {1.0000, 0, 0, 213.0000, 0, 1.0000, 0, 267.8000, 0, 0, 1.0000, 478.9500, 0, 0, 0, 1.0000};
  int JoinNum = 6;
  double Slist[6][6] = {0, 0, 0, 0, 0, 0, 0, 1.0000, 1.0000, 1.0000, 0, 1.0000, 1.0000, 0, 0, 0, 1.0000, 0, 0, -151.9000, -395.5500, -395.5500, 110.4000, -478.9500, 0, 0, 0, 0, -213.0000, 0, 0, 0, 0, 213.0000, 0, 213.0000};
  double thetalist[6] = {0.1, 0.2, 0.3, 0.4, 0.5, 3.14159265358979323846 / 4};
  printf("thetalist:\n");
  for (i = 0; i < 6; i++) {
    printf("%lf ", thetalist[i]);
  }
  printf("\n");
  double T[4][4];
  FKinSpace(M, JoinNum, (double *)Slist, thetalist, T);
  printf("T:\n");
  for (i = 0; i < 4; i++) {
    printf("%lf %lf %lf %lf\n", T[i][0], T[i][1], T[i][2], T[i][3]);
  }
  return;
}
```