user: Translate the below assembly code into C programming language:

```asm
<ctm_fitting>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdx,%rbx
  mov    $0x48,%edx
  sub    $0x1b8,%rsp
  mov    %rdi,(%rsp)
  lea    0x50(%rsp),%r12
  lea    0x70(%rsp),%rbp
  mov    %esi,0xc(%rsp)
  lea    0x90(%rsp),%r15
  xor    %esi,%esi
  lea    0x30(%rsp),%r13
  mov    %r15,%rdi
  lea    0x10(%rsp),%r14
  mov    %fs:0x28,%rax
  mov    %rax,0x1a8(%rsp)
  xor    %eax,%eax
  call   <memset@plt>
  mov    $0x18,%edx
  xor    %esi,%esi
  mov    %r12,%rdi
  call   <memset@plt>
  mov    $0x18,%edx
  xor    %esi,%esi
  mov    %rbp,%rdi
  call   <memset@plt>
  mov    $0x18,%edx
  xor    %esi,%esi
  mov    %r13,%rdi
  call   <memset@plt>
  mov    $0x18,%edx
  xor    %esi,%esi
  mov    %r14,%rdi
  call   <memset@plt>
  mov    0xc(%rsp),%edx
  mov    (%rsp),%rsi
  mov    $0x4,%ecx
  lea    D69(%rip),%rdi
  call   <print_matrix@plt>
  mov    0xc(%rsp),%r9d
  test   %r9d,%r9d
  jle    L0
  mov    (%rsp),%rax
  lea    -0x1(%r9),%edx
  movsd  0x90(%rsp),%xmm12
  shl    $0x5,%rdx
  movsd  0x70(%rsp),%xmm7
  movsd  0x98(%rsp),%xmm4
  movsd  0xa0(%rsp),%xmm13
  movsd  0x50(%rsp),%xmm10
  lea    0x20(%rax,%rdx,1),%rdx
  movsd  0xb0(%rsp),%xmm11
  movsd  0x58(%rsp),%xmm9
  movsd  0xb8(%rsp),%xmm3
  movsd  0x60(%rsp),%xmm8
  movsd  0x80(%rsp),%xmm5
  movsd  0x78(%rsp),%xmm6
  nopl   0x0(%rax)
L2:
  movsd  (%rax),%xmm1
  add    $0x20,%rax
  movapd %xmm1,%xmm0
  movapd %xmm1,%xmm2
  movapd %xmm1,%xmm14
  mulsd  %xmm1,%xmm0
  addsd  %xmm1,%xmm13
  addsd  %xmm0,%xmm12
  movsd  -0x18(%rax),%xmm0
  mulsd  %xmm0,%xmm2
  addsd  %xmm0,%xmm3
  addsd  %xmm2,%xmm4
  movapd %xmm0,%xmm2
  mulsd  %xmm0,%xmm2
  addsd  %xmm2,%xmm11
  movsd  -0x10(%rax),%xmm2
  mulsd  %xmm2,%xmm14
  addsd  %xmm2,%xmm8
  addsd  %xmm14,%xmm10
  movapd %xmm0,%xmm14
  mulsd  %xmm2,%xmm14
  movsd  -0x8(%rax),%xmm2
  mulsd  %xmm2,%xmm1
  addsd  %xmm2,%xmm5
  mulsd  %xmm2,%xmm0
  addsd  %xmm14,%xmm9
  addsd  %xmm1,%xmm7
  addsd  %xmm0,%xmm6
  cmp    %rdx,%rax
  jne    L2
  movsd  %xmm12,0x90(%rsp)
  movsd  %xmm4,0x98(%rsp)
  movsd  %xmm13,0xa0(%rsp)
  movsd  %xmm11,0xb0(%rsp)
  movsd  %xmm3,0xb8(%rsp)
  movsd  %xmm10,0x50(%rsp)
  movsd  %xmm9,0x58(%rsp)
  movsd  %xmm8,0x60(%rsp)
  movsd  %xmm7,0x70(%rsp)
  movsd  %xmm6,0x78(%rsp)
  movsd  %xmm5,0x80(%rsp)
L35:
  pxor   %xmm0,%xmm0
  mov    %r15,%rsi
  mov    $0x3,%ecx
  mov    $0x3,%edx
  cvtsi2sd %r9d,%xmm0
  lea    D40(%rip),%rdi
  movsd  %xmm4,0xa8(%rsp)
  movsd  %xmm13,0xc0(%rsp)
  movsd  %xmm3,0xc8(%rsp)
  movsd  %xmm0,0xd0(%rsp)
  call   <print_matrix@plt>
  mov    $0x1,%ecx
  mov    %r12,%rsi
  mov    $0x3,%edx
  lea    D24(%rip),%rdi
  call   <print_matrix@plt>
  mov    $0x1,%ecx
  mov    %rbp,%rsi
  mov    $0x3,%edx
  lea    D18(%rip),%rdi
  call   <print_matrix@plt>
  mov    %r15,%rax
  lea    0xe0(%rsp),%r15
  lea    0xd8(%rsp),%rsi
  mov    %r15,%rcx
  mov    %rax,%rdx
L17:
  movsd  (%rdx),%xmm0
  add    $0x18,%rdx
  add    $0x20,%rcx
  add    $0x8,%r12
  movsd  %xmm0,-0x20(%rcx)
  movsd  -0x10(%rdx),%xmm0
  movsd  %xmm0,-0x18(%rcx)
  movsd  -0x8(%rdx),%xmm0
  movsd  %xmm0,-0x10(%rcx)
  movsd  -0x8(%r12),%xmm0
  movsd  %xmm0,-0x8(%rcx)
  cmp    %rdx,%rsi
  jne    L17
  lea    0x140(%rsp),%r12
  mov    %r12,%rdx
L28:
  movsd  (%rax),%xmm0
  add    $0x18,%rax
  add    $0x20,%rdx
  add    $0x8,%rbp
  movsd  %xmm0,-0x20(%rdx)
  movsd  -0x10(%rax),%xmm0
  movsd  %xmm0,-0x18(%rdx)
  movsd  -0x8(%rax),%xmm0
  movsd  %xmm0,-0x10(%rdx)
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,-0x8(%rdx)
  cmp    %rax,%rsi
  jne    L28
  mov    $0x4,%ecx
  mov    $0x3,%edx
  mov    %r15,%rsi
  lea    D8(%rip),%rdi
  call   <print_matrix@plt>
  mov    $0x4,%ecx
  mov    %r12,%rsi
  mov    $0x3,%edx
  lea    D71(%rip),%rdi
  call   <print_matrix@plt>
  mov    $0x3,%edx
  mov    %r14,%rsi
  mov    %r15,%rdi
  call   <gauss1@plt>
  mov    $0x3,%edx
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <gauss1@plt>
  mov    $0x1,%ecx
  mov    %r14,%rsi
  mov    $0x3,%edx
  lea    D46(%rip),%rdi
  call   <print_matrix@plt>
  mov    $0x1,%ecx
  mov    %r13,%rsi
  mov    $0x3,%edx
  lea    D55(%rip),%rdi
  call   <print_matrix@plt>
  movsd  0x10(%rsp),%xmm0
  mov    D1(%rip),%rax
  movq   $0x0,0x30(%rbx)
  movq   $0x0,0x38(%rbx)
  movsd  %xmm0,(%rbx)
  movsd  0x30(%rsp),%xmm0
  mov    %rax,0x40(%rbx)
  movsd  %xmm0,0x18(%rbx)
  movsd  0x18(%rsp),%xmm0
  movsd  %xmm0,0x8(%rbx)
  movsd  0x38(%rsp),%xmm0
  movsd  %xmm0,0x20(%rbx)
  movsd  0x20(%rsp),%xmm0
  movsd  %xmm0,0x10(%rbx)
  movsd  0x40(%rsp),%xmm0
  movsd  %xmm0,0x28(%rbx)
  mov    0x1a8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L55
  add    $0x1b8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L0:
  movsd  0x98(%rsp),%xmm4
  movsd  0xa0(%rsp),%xmm13
  movsd  0xb8(%rsp),%xmm3
  jmp    L35
L55:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D69
data_type: string
name: extract_symbolic_data
arguments: data_label: D40
data_type: string
name: extract_symbolic_data
arguments: data_label: D24
data_type: string
name: extract_symbolic_data
arguments: data_label: D18
data_type: string
name: extract_symbolic_data
arguments: data_label: D8
data_type: string
name: extract_symbolic_data
arguments: data_label: D71
data_type: string
name: extract_symbolic_data
arguments: data_label: D46
data_type: string
name: extract_symbolic_data
arguments: data_label: D55
data_type: string
name: extract_symbolic_data
arguments: data_label: D1
data_type: byte[8]

tool: D69: XY

tool: D40: ata

tool: D24: atx

tool: D18: aty

tool: D8: ata\atx

tool: D71: ata\aty

tool: D46: abc

tool: D55: def

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

assistant: ```c
void ctm_fitting(double *xy, int cnt, double *coeff_return) {
  int i;
  double abc[3], def[3];
  double ata[9], atx[3], aty[3];
  memset(ata, 0, sizeof ata);
  ;
  memset(atx, 0, sizeof atx);
  ;
  memset(aty, 0, sizeof aty);
  ;
  memset(def, 0, sizeof def);
  ;
  memset(abc, 0, sizeof abc);
  ;
  print_matrix("XY", xy, cnt, 4);
  for (i = 0; i < cnt; i++) {
    double *xy1 = xy + 4 * i;
    ata[0] += xy1[0] * xy1[0];
    ata[1] += xy1[0] * xy1[1];
    ata[2] += xy1[0];
    ata[4] += xy1[1] * xy1[1];
    ata[5] += xy1[1];
    atx[0] += xy1[0] * xy1[2];
    atx[1] += xy1[1] * xy1[2];
    atx[2] += xy1[2];
    aty[0] += xy1[0] * xy1[3];
    aty[1] += xy1[1] * xy1[3];
    aty[2] += xy1[3];
  }
  ata[3] = ata[1];
  ata[6] = ata[2];
  ata[7] = ata[5];
  ata[8] = cnt;
  print_matrix("ata", ata, 3, 3);
  print_matrix("atx", atx, 3, 1);
  print_matrix("aty", aty, 3, 1);
  double bgauss1[4 * 3], bgauss2[4 * 3];
  for (i = 0; i < 3; i++) {
    double *b = bgauss1 + i * 4;
    double *a = ata + i * 3;
    double *x = atx + i;
    b[0] = a[0];
    b[1] = a[1];
    b[2] = a[2];
    b[3] = x[0];
  }
  for (i = 0; i < 3; i++) {
    double *b = bgauss2 + i * 4;
    double *a = ata + i * 3;
    double *x = aty + i;
    b[0] = a[0];
    b[1] = a[1];
    b[2] = a[2];
    b[3] = x[0];
  }
  print_matrix("ata\\atx", bgauss1, 3, 4);
  print_matrix("ata\\aty", bgauss2, 3, 4);
  gauss1(bgauss1, abc, 3);
  gauss1(bgauss2, def, 3);
  print_matrix("abc", abc, 3, 1);
  print_matrix("def", def, 3, 1);
  for (i = 0; i < 3; i++) {
    coeff_return[3 * 0 + i] = abc[i];
    coeff_return[3 * 1 + i] = def[i];
  }
  coeff_return[3 * 2 + 0] = 0;
  coeff_return[3 * 2 + 1] = 0;
  coeff_return[3 * 2 + 2] = 1;
}
```