user: 请从给定的汇编指令推导出C源代码：

```asm
<ldvmat>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %edx,%r14d
  imul   %edx,%edx
  test   %edx,%edx
  jle    L102
  mov    %edx,%eax
  lea    (%rsi,%rax,8),%rcx
  mov    %rsi,%rax
L45:
  add    $0x8,%rax
  movq   $0x0,-0x8(%rax)
  cmp    %rcx,%rax
  jne    L45
L102:
  movsd  D2(%rip),%xmm0
  movsd  %xmm0,(%rsi)
  movslq %edx,%rdx
  lea    -0x8(%rsi,%rdx,8),%r12
  movsd  %xmm0,(%r12)
  movslq %r14d,%rax
  lea    0x0(,%rax,8),%rsi
  mov    $0xfffffffffffffff8,%rcx
  sub    %rsi,%rcx
  mov    %rcx,-0x8(%rsp)
  lea    (%r12,%rcx,1),%r11
  sub    %rax,%rdx
  sub    %rax,%rdx
  lea    0x0(,%rdx,8),%rax
  lea    -0x8(%rdi,%rax,1),%r10
  cmp    $0x2,%r14d
  jle    L76
  lea    -0x1(%r14),%r13d
  sub    $0x8,%r12
  add    %rax,%rdi
  lea    0x8(%r11),%rbx
  add    $0x10,%r11
  mov    %r13d,%r15d
  mov    $0x1,%r9d
  pxor   %xmm6,%xmm6
  movapd %xmm6,%xmm10
  movq   D10(%rip),%xmm4
  movapd %xmm0,%xmm9
  movapd %xmm4,%xmm8
  movapd %xmm6,%xmm5
  movapd %xmm0,%xmm7
  jmp    L195
L173:
  test   %r9d,%r9d
  jle    L16
  mov    $0x0,%eax
L155:
  add    $0x1,%eax
  cmp    %r9d,%eax
  jne    L155
  movapd %xmm9,%xmm0
  subsd  %xmm3,%xmm0
  movsd  %xmm0,-0x8(%rbx)
  mov    %r12,%rdx
  mov    %r10,%rax
  movapd %xmm3,%xmm1
  xorpd  %xmm8,%xmm1
L163:
  add    $0x8,%rax
  movapd %xmm1,%xmm0
  mulsd  -0x8(%rax),%xmm0
  movsd  %xmm0,(%rdx)
  add    %rsi,%rdx
  cmp    %rdi,%rax
  jne    L163
L183:
  mov    %rbx,%r8
  cmp    %r13d,%r14d
  jle    L207
  lea    -0x1(%r9),%eax
  lea    0x10(%rcx,%rax,8),%rbp
  jmp    L25
L73:
  add    $0x8,%rcx
  movapd %xmm1,%xmm2
  mulsd  -0x8(%rcx),%xmm2
  movsd  (%rdx),%xmm0
  subsd  %xmm2,%xmm0
  movsd  %xmm0,(%rdx)
  add    %rsi,%rdx
  cmp    %rax,%rcx
  jne    L73
L52:
  add    $0x8,%r8
  xorpd  %xmm4,%xmm1
  movsd  %xmm1,-0x8(%r8)
  cmp    %r8,%rbp
  je     L207
L25:
  lea    (%r8,%rsi,1),%rdx
  test   %r9d,%r9d
  jle    L10
  mov    %rdx,%rcx
  mov    %r10,%rax
  pxor   %xmm1,%xmm1
L158:
  add    $0x8,%rax
  movsd  (%rcx),%xmm0
  mulsd  -0x8(%rax),%xmm0
  addsd  %xmm0,%xmm1
  add    %rsi,%rcx
  cmp    %rdi,%rax
  jne    L158
  mulsd  %xmm3,%xmm1
  mov    %r10,%rcx
  jmp    L73
L207:
  mov    -0x8(%rsp),%rax
  add    %rax,%r10
  add    $0x1,%r9d
  sub    $0x1,%r13d
  add    %rax,%r12
  sub    %rsi,%rdi
  add    %rax,%rbx
  sub    %rsi,%r11
  cmp    %r15d,%r9d
  je     L76
L195:
  lea    -0x8(%rbx),%rcx
  movsd  -0x8(%r10),%xmm3
  ucomisd %xmm6,%xmm3
  jp     L173
  ucomisd %xmm5,%xmm3
  jne    L173
  mov    %rbx,%rax
  movsd  %xmm7,-0x8(%rbx)
  mov    %r12,%rdx
  test   %r9d,%r9d
  jle    L207
L153:
  add    $0x8,%rax
  movq   $0x0,-0x8(%rax)
  movq   $0x0,(%rdx)
  add    %rsi,%rdx
  cmp    %r11,%rax
  jne    L153
  jmp    L207
L10:
  movapd %xmm3,%xmm1
  mulsd  %xmm10,%xmm1
  jmp    L52
L16:
  movsd  D2(%rip),%xmm0
  subsd  %xmm3,%xmm0
  movsd  %xmm0,-0x8(%rbx)
  jmp    L183
L76:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: retrieve_data
arguments: label: D2
type_guessed: f64
name: retrieve_data
arguments: label: D10
type_guessed: f32[2]

tool: D2: 1

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

assistant: ```c
void ldvmat(double *a, double *v, int n) {
  double *p0, *q0, *p, *q, *qq;
  double h, s;
  int i, j, k, mm;
  for (i = 0, mm = n * n, q = v; i < mm; ++i)
    *q++ = 0.;
  *v = 1.;
  q0 = v + n * n - 1;
  *q0 = 1.;
  q0 -= n + 1;
  p0 = a + n * n - n - n - 1;
  for (i = n - 2, mm = 1; i > 0; --i, p0 -= n + 1, q0 -= n + 1, ++mm) {
    if (*(p0 - 1) != 0.) {
      for (j = 0, p = p0, h = 1.; j < mm; ++j, ++p)
        h += *p * *p;
      h = *(p0 - 1);
      *q0 = 1. - h;
      for (j = 0, q = q0 + n, p = p0; j < mm; ++j, q += n)
        *q = -h * *p++;
      for (k = i + 1, q = q0 + 1; k < n; ++k) {
        for (j = 0, qq = q + n, p = p0, s = 0.; j < mm; ++j, qq += n)
          s += *qq * *p++;
        s *= h;
        for (j = 0, qq = q + n, p = p0; j < mm; ++j, qq += n)
          *qq -= s * *p++;
        *q++ = -s;
      }
    } else {
      *q0 = 1.;
      for (j = 0, p = q0 + 1, q = q0 + n; j < mm; ++j, q += n)
        *q = *p++ = 0.;
    }
  }
}
```