user: 请将以下的汇编代码转换成C语言代码：

```asm
<levnsn>:
  endbr64
  push   %r15
  mov    %r8,%r15
  push   %r14
  mov    %rdx,%r14
  push   %r13
  mov    %rsi,%r13
  push   %r12
  mov    %rcx,%r12
  push   %rbp
  push   %rbx
  mov    %edi,%ebx
  sub    $0x8,%rsp
  test   %edi,%edi
  jle    L111
  movslq %edi,%rdi
  lea    0x0(,%rdi,8),%rbp
  lea    (%r8,%rbp,1),%rsi
  lea    (%r12,%rbp,1),%rax
  cmp    %rsi,%r12
  lea    (%rdx,%rbp,1),%rcx
  setae  %dl
  cmp    %rax,%r8
  setae  %r8b
  or     %r8d,%edx
  cmp    %rax,%r14
  setae  %al
  cmp    %rcx,%r12
  setae  %r8b
  or     %r8d,%eax
  test   %al,%dl
  je     L90
  cmp    %rsi,%r14
  setae  %al
  cmp    %rcx,%r15
  setae  %dl
  or     %dl,%al
  je     L90
  mov    %rbp,%rdx
  xor    %esi,%esi
  mov    %r14,%rdi
  call   <memset@plt>
  mov    %rbp,%rdx
  xor    %esi,%esi
  mov    %r12,%rdi
  call   <memset@plt>
  mov    %rbp,%rdx
  xor    %esi,%esi
  mov    %r15,%rdi
  call   <memset@plt>
L127:
  mov    %ebx,%ebp
L28:
  movsd  0x0(%r13),%xmm1
  movq   D8(%rip),%xmm5
  movsd  D0(%rip),%xmm6
  movsd  D7(%rip),%xmm7
  movsd  %xmm1,(%r12)
  movsd  0x8(%r13),%xmm0
  movapd %xmm6,%xmm3
  xorpd  %xmm5,%xmm0
  divsd  %xmm1,%xmm0
  movapd %xmm0,%xmm2
  mulsd  %xmm0,%xmm2
  subsd  %xmm2,%xmm3
  mulsd  %xmm1,%xmm3
  comisd %xmm3,%xmm7
  movsd  %xmm3,0x8(%r12)
  movsd  %xmm0,0x8(%r14)
  movsd  %xmm0,0x8(%r15)
  ja     L73
  cmp    $0x2,%ebx
  jle    L73
  lea    0x10(%r14),%r11
  lea    0x8(%r14),%r10
  mov    $0x2,%esi
  lea    0x10(%r12),%r9
  lea    0x10(%r15),%r8
  pxor   %xmm4,%xmm4
  mov    %r11,%rcx
  lea    0x8(%r13),%rdi
  nopl   0x0(%rax)
L126:
  mov    %rdi,%rdx
  mov    %r10,%rax
  movapd %xmm4,%xmm1
  nopw   0x0(%rax,%rax,1)
L129:
  sub    $0x8,%rdx
  movsd  (%rax),%xmm0
  add    $0x8,%rax
  mulsd  0x8(%rdx),%xmm0
  addsd  %xmm0,%xmm1
  cmp    %rcx,%rax
  jne    L129
  addsd  0x8(%rdi),%xmm1
  mov    %esi,%edx
  mov    %r10,%rax
  sub    %ebp,%edx
  sub    $0x1,%edx
  xorpd  %xmm5,%xmm1
  lea    (%r10,%rdx,8),%r12
  mov    %esi,%edx
  divsd  %xmm3,%xmm1
  sar    %edx
  sub    $0x1,%edx
  lea    (%r11,%rdx,8),%r13
  mov    %rcx,%rdx
  movsd  %xmm1,(%r8)
L53:
  movsd  -0x8(%rdx),%xmm8
  movapd %xmm1,%xmm2
  movsd  (%rax),%xmm0
  mulsd  %xmm8,%xmm2
  addsd  %xmm0,%xmm2
  movsd  %xmm2,(%rax)
  cmp    %r12,%rax
  je     L64
  mulsd  %xmm1,%xmm0
  add    $0x8,%rax
  sub    $0x8,%rdx
  addsd  %xmm8,%xmm0
  movsd  %xmm0,(%rdx)
  cmp    %r13,%rax
  jne    L53
L64:
  movsd  %xmm1,(%rcx)
  mulsd  %xmm1,%xmm1
  movapd %xmm6,%xmm0
  subsd  %xmm1,%xmm0
  mulsd  %xmm0,%xmm3
  comisd %xmm3,%xmm4
  movsd  %xmm3,(%r9)
  jbe    L89
  xorpd  %xmm5,%xmm3
L89:
  comisd %xmm3,%xmm7
  ja     L73
  add    $0x1,%esi
  add    $0x8,%rcx
  add    $0x8,%r9
  add    $0x8,%r8
  add    $0x8,%rdi
  cmp    %esi,%ebx
  jne    L126
L73:
  add    $0x8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L111:
  xor    %ebp,%ebp
  jmp    L28
L90:
  xor    %eax,%eax
  nopl   0x0(%rax,%rax,1)
L55:
  movq   $0x0,(%r14,%rax,8)
  movq   $0x0,(%r12,%rax,8)
  movq   $0x0,(%r15,%rax,8)
  add    $0x1,%rax
  cmp    %rax,%rdi
  jne    L55
  jmp    L127
```

tool_calls: name: parse_data
arguments: label: D8
data_type: f32[2]
name: parse_data
arguments: label: D0
data_type: f64
name: parse_data
arguments: label: D7
data_type: byte[8]

tool: {"D8": [0.0,-0.0]}

tool: D0: 1

tool: {"D7": [0x7b,0x14,0xae,0x47,0xe1,0x7a,0x84,0x3f]}

assistant: ```c
int levnsn(n, r, a, e, refl)
int n;
double r[], a[], e[], refl[];
{
  int k, km1, i, kmi, j;
  double ai, akk, err, err1, r0, t, akmi;
  double *pa, *pr;
  for (i = 0; i < n; i++) {
    a[i] = 0.0;
    e[i] = 0.0;
    refl[i] = 0.0;
  }
  r0 = r[0];
  e[0] = r0;
  err = r0;
  akk = -r[1] / err;
  err = (1.0 - akk * akk) * err;
  e[1] = err;
  a[1] = akk;
  refl[1] = akk;
  if (err < 1.0e-2)
    return 0;
  for (k = 2; k < n; k++) {
    t = 0.0;
    pa = &a[1];
    pr = &r[k - 1];
    for (j = 1; j < k; j++)
      t += *pa++ * *pr--;
    akk = -(r[k] + t) / err;
    refl[k] = akk;
    km1 = k / 2;
    for (j = 1; j <= km1; j++) {
      kmi = k - j;
      ai = a[j];
      akmi = a[kmi];
      a[j] = ai + akk * akmi;
      if (i == kmi)
        goto nxtk;
      a[kmi] = akmi + akk * ai;
    }
  nxtk:
    a[k] = akk;
    err1 = (1.0 - akk * akk) * err;
    e[k] = err1;
    if (err1 < 0)
      err1 = -err1;
    if (err1 < 1.0e-2)
      return 0;
    err = err1;
  }
  return 0;
}
```