user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<bmv_>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  movslq %ecx,%r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %rsi,0x10(%rsp)
  mov    %rdx,0x30(%rsp)
  mov    %r8,(%rsp)
  mov    %r9,0x8(%rsp)
  test   %r13d,%r13d
  je     L133
  mov    %edi,%r12d
  movslq %r13d,%rax
  mov    %rsi,%rbx
  mov    %rsi,%rdi
  add    $0x1,%rax
  lea    0x1(%r12),%ebp
  lea    -0x8(%r8),%rsi
  mov    %r8,%rdx
  lea    -0x8(%r9),%rcx
  lea    0x0(,%rax,8),%r10
  movsd  (%rsi,%rax,8),%xmm0
  movslq %ebp,%rbp
  mov    %rcx,0x48(%rsp)
  shl    $0x3,%rbp
  add    %r10,%rcx
  mov    %r10,0x28(%rsp)
  sub    %rbp,%rbx
  mov    %rcx,0x38(%rsp)
  movsd  %xmm0,(%rcx)
  cmp    $0x1,%r13d
  jle    L100
  lea    0x8(%rdi),%rax
  lea    0x1(%r13),%edi
  pxor   %xmm3,%xmm3
  add    $0x10,%rdx
  mov    %edi,0x18(%rsp)
  movslq %r12d,%rdi
  lea    -0x8(%r10),%r11
  lea    -0x8(%rbp),%r9
  mov    %rdx,0x20(%rsp)
  shl    $0x4,%rdi
  mov    $0x2,%ecx
  mov    $0x1,%r10d
  mov    %r13d,0x40(%rsp)
  lea    0x10(%rdi),%r8
  mov    %rax,%r13
  nopw   0x0(%rax,%rax,1)
L269:
  cmp    $0x2,%ecx
  je     L72
  mov    %r10d,%eax
  mov    0x10(%rsp),%r14
  mov    (%rsp),%rdx
  movapd %xmm3,%xmm1
  shr    %eax
  lea    -0x1(%rax),%r15d
  mov    %r13,%rax
  shl    $0x4,%r15
  add    0x20(%rsp),%r15
  nopl   0x0(%rax,%rax,1)
L81:
  movsd  (%rax),%xmm0
  movupd (%rdx),%xmm6
  add    $0x10,%rdx
  movsd  (%r14),%xmm2
  movhpd (%rax,%r9,1),%xmm0
  add    %rdi,%rax
  mulpd  %xmm6,%xmm0
  movhpd (%r14,%rbp,1),%xmm2
  add    %r8,%r14
  divpd  %xmm2,%xmm0
  addsd  %xmm0,%xmm1
  unpckhpd %xmm0,%xmm0
  addsd  %xmm0,%xmm1
  cmp    %r15,%rdx
  jne    L81
  mov    %r10d,%eax
  or     $0x1,%eax
  test   $0x1,%r10b
  je     L3
L61:
  mov    %r12d,%r14d
  movslq %eax,%r15
  imul   %eax,%r14d
  lea    (%rcx,%r14,1),%edx
  add    %r14d,%eax
  movslq %edx,%rdx
  cltq
  movsd  (%rbx,%rdx,8),%xmm0
  mulsd  (%rsi,%r15,8),%xmm0
  divsd  (%rbx,%rax,8),%xmm0
  addsd  %xmm0,%xmm1
L3:
  mov    (%rsp),%rax
  add    $0x1,%ecx
  add    $0x1,%r10d
  add    $0x8,%r13
  addsd  0x8(%rax,%r11,1),%xmm1
  mov    0x8(%rsp),%rax
  movsd  %xmm1,0x8(%rax,%r11,1)
  add    $0x8,%r11
  cmp    0x18(%rsp),%ecx
  jne    L269
  movslq 0x40(%rsp),%r13
  mov    0x90(%rsp),%r9
  mov    %r12d,%esi
  mov    $0x1,%r8d
  mov    0x38(%rsp),%rcx
  mov    0x30(%rsp),%rdi
  movsd  %xmm3,0x18(%rsp)
  mov    %r13d,%edx
  call   <dtrsl_@plt>
  mov    0x90(%rsp),%rax
  movsd  0x18(%rsp),%xmm3
  mov    (%rax),%eax
  test   %eax,%eax
  jne    L133
L41:
  mov    0x10(%rsp),%rax
  mov    $0x1,%r15d
  mov    %rax,%r14
  cs nopw 0x0(%rax,%rax,1)
L17:
  movsd  (%rax),%xmm0
  mov    (%rsp),%rdi
  ucomisd %xmm0,%xmm3
  movsd  -0x8(%rdi,%r15,8),%xmm1
  ja     L94
  sqrtsd %xmm0,%xmm0
  mov    0x8(%rsp),%rsi
  add    %rbp,%rax
  divsd  %xmm0,%xmm1
  movsd  %xmm1,-0x8(%rsi,%r15,8)
  add    $0x1,%r15
  cmp    %r15d,%r13d
  jge    L17
L219:
  mov    0x38(%rsp),%rcx
  mov    0x30(%rsp),%rdi
  mov    %r13d,%edx
  xor    %r8d,%r8d
  mov    0x90(%rsp),%r9
  mov    %r12d,%esi
  movsd  %xmm3,(%rsp)
  call   <dtrsl_@plt>
  mov    0x90(%rsp),%rax
  mov    (%rax),%edx
  test   %edx,%edx
  jne    L133
  mov    0x8(%rsp),%rax
  movq   D12(%rip),%xmm2
  mov    $0x1,%r15d
  movsd  (%rsp),%xmm3
  nopl   0x0(%rax,%rax,1)
L7:
  movsd  (%r14),%xmm0
  movsd  -0x8(%rax,%r15,8),%xmm1
  ucomisd %xmm0,%xmm3
  xorpd  %xmm2,%xmm1
  ja     L202
  sqrtsd %xmm0,%xmm0
  add    %rbp,%r14
  divsd  %xmm0,%xmm1
  movsd  %xmm1,-0x8(%rax,%r15,8)
  add    $0x1,%r15
  cmp    %r15d,%r13d
  jge    L7
L95:
  cmp    $0x1,%r13d
  jle    L130
  mov    0x10(%rsp),%rax
  mov    %r12d,(%rsp)
  lea    0x1(%r13),%r14d
  mov    %r12d,%ecx
  mov    0x8(%rsp),%r11
  mov    0x48(%rsp),%rdi
  mov    $0x2,%r8d
  mov    $0x1,%r15d
  lea    -0x8(%rax),%r10
  lea    0x8(%rax),%rsi
  nopl   (%rax)
L119:
  mov    %r14d,%r12d
  movsd  0x8(%r10),%xmm4
  sub    %r8d,%r12d
  cmp    %r8d,%r13d
  cmovl  %r15d,%r12d
  jle    L108
  mov    0x28(%rsp),%rax
  movapd %xmm4,%xmm5
  movapd %xmm3,%xmm0
  mov    %r12d,%edx
  shr    %edx
  unpcklpd %xmm5,%xmm5
  lea    (%rax,%r11,1),%r9
  shl    $0x4,%rdx
  xor    %eax,%eax
  nopl   0x0(%rax)
L223:
  movupd (%r9,%rax,1),%xmm2
  movupd (%rsi,%rax,1),%xmm7
  add    $0x10,%rax
  mulpd  %xmm7,%xmm2
  divpd  %xmm5,%xmm2
  addsd  %xmm2,%xmm0
  unpckhpd %xmm2,%xmm2
  addsd  %xmm2,%xmm0
  cmp    %rax,%rdx
  jne    L223
  mov    %r12d,%edx
  and    $0xfffffffe,%edx
  lea    (%rdx,%r8,1),%eax
  cmp    %r12d,%edx
  je     L71
L177:
  lea    0x0(%r13,%rax,1),%edx
  add    %ecx,%eax
  movslq %edx,%rdx
  cltq
  movsd  (%rdi,%rdx,8),%xmm1
  mulsd  (%rbx,%rax,8),%xmm1
  divsd  %xmm4,%xmm1
  addsd  %xmm1,%xmm0
L71:
  addsd  (%r11),%xmm0
  add    $0x1,%r8d
  add    %rbp,%r10
  add    $0x8,%r11
  add    (%rsp),%ecx
  add    %rbp,%rsi
  movsd  %xmm0,-0x8(%r11)
  cmp    %r14d,%r8d
  jne    L119
L130:
  test   %r13d,%r13d
  mov    $0x1,%eax
  mov    0x48(%rsp),%rsi
  cmovg  %r13,%rax
  lea    (%rsi,%rax,8),%rax
  addsd  (%rax),%xmm3
  movsd  %xmm3,(%rax)
L133:
  add    $0x58,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L72:
  movapd %xmm3,%xmm1
  mov    $0x1,%eax
  jmp    L61
L108:
  mov    %r8d,%eax
  movapd %xmm3,%xmm0
  jmp    L177
L100:
  mov    0x90(%rsp),%r9
  mov    0x30(%rsp),%rdi
  mov    %r13d,%edx
  mov    %r12d,%esi
  mov    $0x1,%r8d
  call   <dtrsl_@plt>
  mov    0x90(%rsp),%rax
  mov    (%rax),%ecx
  test   %ecx,%ecx
  jne    L133
  cmp    $0x1,%r13d
  je     L140
  mov    0x38(%rsp),%rcx
  mov    0x30(%rsp),%rdi
  mov    %rax,%r9
  xor    %r8d,%r8d
  mov    %r13d,%edx
  mov    %r12d,%esi
  call   <dtrsl_@plt>
  jmp    L133
L94:
  mov    %rax,0x20(%rsp)
  movsd  %xmm3,0x40(%rsp)
  movsd  %xmm1,0x18(%rsp)
  call   <sqrt@plt>
  movsd  0x18(%rsp),%xmm1
  mov    0x8(%rsp),%rax
  movsd  0x40(%rsp),%xmm3
  divsd  %xmm0,%xmm1
  movsd  %xmm1,-0x8(%rax,%r15,8)
  mov    0x20(%rsp),%rax
  add    $0x1,%r15
  add    %rbp,%rax
  cmp    %r15d,%r13d
  jge    L17
  jmp    L219
L202:
  mov    %rax,0x18(%rsp)
  add    %rbp,%r14
  movsd  %xmm3,0x20(%rsp)
  movsd  %xmm1,(%rsp)
  call   <sqrt@plt>
  movsd  (%rsp),%xmm1
  mov    0x18(%rsp),%rax
  movq   D12(%rip),%xmm2
  movsd  0x20(%rsp),%xmm3
  divsd  %xmm0,%xmm1
  movsd  %xmm1,-0x8(%rax,%r15,8)
  add    $0x1,%r15
  cmp    %r15d,%r13d
  jge    L7
  jmp    L95
L140:
  pxor   %xmm3,%xmm3
  jmp    L41
```

tool_calls: name: read_data
arguments: data_label: D12
data_type: f32[2]

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

assistant: ```c
int bmv_(int m, double *sy, double *wt, int col, double *v, double *p, int *info) {
  int sy_offset, wt_offset;
  int i, k, icol;
  double sum;
  wt_offset = 1 + m;
  wt -= wt_offset;
  sy_offset = 1 + m;
  sy -= sy_offset;
  --p;
  --v;
  if (col == 0) {
    return 0;
  }
  p[col + 1] = v[col + 1];
  for (i = 2; i <= col; ++i) {
    icol = col + i;
    sum = 0.0;
    for (k = 1; k < i; ++k) {
      sum += sy[i + k * m] * v[k] / sy[k + k * m];
    }
    p[icol] = v[icol] + sum;
  }
  dtrsl_(&wt[wt_offset], m, col, &p[col + 1], 1, info);
  if (*info != 0) {
    return 0;
  }
  for (i = 1; i <= col; ++i) {
    p[i] = v[i] / sqrt(sy[i + i * m]);
  }
  dtrsl_(&wt[wt_offset], m, col, &p[col + 1], 0, info);
  if (*info != 0) {
    return 0;
  }
  for (i = 1; i <= col; ++i) {
    p[i] = -p[i] / sqrt(sy[i + i * m]);
  }
  for (i = 1; i <= col; ++i) {
    sum = 0.0;
    for (k = i + 1; k <= col; ++k) {
      sum += sy[k + i * m] * p[col + k] / sy[i + i * m];
    }
    p[i] += sum;
  }
  return 0;
}
```