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

```asm
<lm_qrfac>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xa8,%rsp
  mov    %edi,%r12d
  mov    %esi,0x98(%rsp)
  mov    %rdx,%r15
  mov    %ecx,0x30(%rsp)
  mov    %r8,0x88(%rsp)
  mov    %r9,%r13
  mov    0xe0(%rsp),%r14
  test   %esi,%esi
  jle    L207
  movslq %edi,%rax
  shl    $0x3,%rax
  mov    %rax,0x8(%rsp)
  mov    %rdx,%rbp
  mov    %esi,%eax
  mov    %rax,0x10(%rsp)
  mov    $0x0,%ebx
  mov    %rdx,0x18(%rsp)
  mov    %edi,%r15d
  mov    0xe8(%rsp),%r12
  jmp    L98
L88:
  add    $0x1,%rbx
  add    0x8(%rsp),%rbp
  cmp    0x10(%rsp),%rbx
  je     L12
L98:
  mov    %rbp,%rsi
  mov    %r15d,%edi
  mov    $0x0,%eax
  call   <lm_enorm@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,(%r14,%rbx,8)
  movsd  %xmm0,0x0(%r13,%rbx,8)
  movsd  %xmm0,(%r12,%rbx,8)
  cmpl   $0x0,0x30(%rsp)
  je     L88
  mov    0x88(%rsp),%rax
  mov    %ebx,(%rax,%rbx,4)
  jmp    L88
L12:
  mov    %r15d,%r12d
  mov    0x18(%rsp),%r15
L207:
  mov    0x98(%rsp),%eax
  cmp    %r12d,%eax
  cmovg  %r12d,%eax
  test   %eax,%eax
  jle    L252
  lea    -0x1(%r12),%esi
  mov    %esi,0x9c(%rsp)
  movslq %r12d,%rdi
  mov    %rdi,0x68(%rsp)
  lea    0x1(%rdi),%rcx
  mov    %rcx,0x70(%rsp)
  shl    $0x3,%rdi
  mov    %rdi,0x78(%rsp)
  mov    %eax,%eax
  mov    %rax,0x80(%rsp)
  mov    %r15,%r14
  mov    %esi,0x18(%rsp)
  movq   $0x0,0x28(%rsp)
  movq   $0x0,0x10(%rsp)
  movl   $0x0,0x5c(%rsp)
  movq   $0x1,0x50(%rsp)
  mov    $0x0,%ebp
  jmp    L158
L327:
  mov    0x98(%rsp),%esi
  mov    0x50(%rsp),%rax
  cmp    %eax,%esi
  jle    L325
L221:
  movslq %edx,%rcx
  movsd  0x0(%r13,%rax,8),%xmm0
  ucomisd 0x0(%r13,%rcx,8),%xmm0
  cmova  %eax,%edx
  add    $0x1,%rax
  cmp    %eax,%esi
  jg     L221
  cmp    %ebp,%edx
  je     L325
  test   %r12d,%r12d
  jle    L51
  mov    %edx,%ecx
  imul   %r12d,%ecx
  movslq 0x5c(%rsp),%rdi
  lea    (%r15,%rdi,8),%rax
  mov    0x9c(%rsp),%esi
  add    %rdi,%rsi
  lea    0x8(%r15,%rsi,8),%rsi
  movslq %ecx,%rcx
  sub    %rdi,%rcx
L90:
  movsd  (%rax),%xmm0
  movsd  (%rax,%rcx,8),%xmm1
  movsd  %xmm1,(%rax)
  movsd  %xmm0,(%rax,%rcx,8)
  add    $0x8,%rax
  cmp    %rsi,%rax
  jne    L90
L51:
  movslq %edx,%rdx
  movsd  0x0(%r13,%rbp,8),%xmm0
  movsd  %xmm0,0x0(%r13,%rdx,8)
  mov    0xe8(%rsp),%rax
  movsd  (%rax,%rbp,8),%xmm0
  movsd  %xmm0,(%rax,%rdx,8)
  mov    0x88(%rsp),%rdi
  mov    (%rdi,%rbp,4),%ecx
  lea    (%rdi,%rdx,4),%rax
  mov    (%rax),%edx
  mov    %edx,(%rdi,%rbp,4)
  mov    %ecx,(%rax)
  jmp    L325
L304:
  pxor   %xmm7,%xmm7
  cvtsi2sd %eax,%xmm7
  movsd  %xmm7,0x20(%rsp)
  pxor   %xmm0,%xmm0
  mov    0x10(%rsp),%rax
  comisd (%r15,%rax,8),%xmm0
  ja     L149
L267:
  mov    %ebp,0x34(%rsp)
  cmp    %ebp,%r12d
  jle    L26
  mov    0x18(%rsp),%eax
  add    0x10(%rsp),%rax
  lea    0x8(%r15,%rax,8),%rax
L58:
  movsd  (%rbx),%xmm0
  divsd  0x20(%rsp),%xmm0
  movsd  %xmm0,(%rbx)
  add    $0x8,%rbx
  cmp    %rax,%rbx
  jne    L58
L26:
  movsd  D60(%rip),%xmm0
  mov    0x10(%rsp),%rax
  addsd  (%r15,%rax,8),%xmm0
  movsd  %xmm0,(%r15,%rax,8)
  mov    0x98(%rsp),%edi
  mov    0x50(%rsp),%rax
  cmp    %eax,%edi
  jle    L8
  shl    $0x3,%rax
  lea    0x0(%r13,%rax,1),%rbx
  add    0xe8(%rsp),%rax
  mov    %rax,%rsi
  mov    0x5c(%rsp),%eax
  lea    (%rax,%r12,1),%ecx
  lea    -0x2(%rdi),%eax
  sub    0x58(%rsp),%eax
  add    %rbp,%rax
  lea    0x10(%r13,%rax,8),%rax
  mov    %rax,0x38(%rsp)
  mov    %rbp,0x8(%rsp)
  mov    %rsi,%rbp
  mov    %r13,0x90(%rsp)
  mov    %ecx,%r13d
  jmp    L260
L149:
  xorpd  D23(%rip),%xmm7
  movsd  %xmm7,0x20(%rsp)
  jmp    L267
L276:
  pxor   %xmm1,%xmm1
L309:
  sqrtsd %xmm1,%xmm1
L160:
  movsd  0x40(%rsp),%xmm0
  mulsd  %xmm1,%xmm0
  mov    0x48(%rsp),%rax
  movsd  %xmm0,(%rax)
  divsd  0x0(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  D4(%rip),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  D39(%rip),%xmm1
  comisd %xmm0,%xmm1
  jae    L176
L64:
  add    $0x8,%rbx
  add    $0x8,%rbp
  add    %r12d,%r13d
  cmp    0x38(%rsp),%rbx
  je     L310
L260:
  cmp    0x34(%rsp),%r12d
  jle    L328
  movslq %r13d,%rsi
  lea    (%r15,%rsi,8),%rdx
  mov    0x8(%rsp),%rax
  pxor   %xmm1,%xmm1
L52:
  movsd  (%r14,%rax,8),%xmm0
  mulsd  (%rdx,%rax,8),%xmm0
  addsd  %xmm0,%xmm1
  add    $0x1,%rax
  cmp    %eax,%r12d
  jg     L52
  mov    0x10(%rsp),%rax
  divsd  (%r15,%rax,8),%xmm1
  mov    0x8(%rsp),%rdi
  lea    (%rsi,%rdi,1),%rax
  lea    (%r15,%rax,8),%rax
  mov    0x18(%rsp),%edx
  add    %rdi,%rdx
  add    %rsi,%rdx
  lea    0x8(%r15,%rdx,8),%rcx
  mov    0x28(%rsp),%rdx
  sub    %rsi,%rdx
L19:
  movapd %xmm1,%xmm2
  mulsd  (%rax,%rdx,8),%xmm2
  movsd  (%rax),%xmm0
  subsd  %xmm2,%xmm0
  movsd  %xmm0,(%rax)
  add    $0x8,%rax
  cmp    %rax,%rcx
  jne    L19
L328:
  cmpl   $0x0,0x30(%rsp)
  je     L64
  mov    %rbx,0x48(%rsp)
  movsd  (%rbx),%xmm4
  movsd  %xmm4,0x40(%rsp)
  ucomisd D35(%rip),%xmm4
  jp     L213
  je     L64
L213:
  mov    0x58(%rsp),%eax
  add    %r13d,%eax
  cltq
  lea    0x0(,%rax,8),%rdi
  mov    %rdi,0x60(%rsp)
  movsd  (%r15,%rax,8),%xmm0
  divsd  0x40(%rsp),%xmm0
  mulsd  %xmm0,%xmm0
  movsd  D60(%rip),%xmm1
  subsd  %xmm0,%xmm1
  pxor   %xmm6,%xmm6
  comisd %xmm1,%xmm6
  jae    L276
  ucomisd %xmm1,%xmm6
  jbe    L309
  movapd %xmm1,%xmm0
  call   <sqrt@plt>
  movapd %xmm0,%xmm1
  jmp    L160
L176:
  mov    0x60(%rsp),%rax
  lea    0x8(%r15,%rax,1),%rsi
  mov    0x18(%rsp),%edi
  mov    $0x0,%eax
  call   <lm_enorm@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mov    0x48(%rsp),%rax
  movsd  %xmm0,(%rax)
  movsd  %xmm0,0x0(%rbp)
  jmp    L64
L310:
  mov    0x8(%rsp),%rbp
  mov    0x90(%rsp),%r13
L8:
  movsd  0x20(%rsp),%xmm0
  xorpd  D23(%rip),%xmm0
  movsd  %xmm0,0x0(%r13,%rbp,8)
L173:
  add    $0x1,%rbp
  addq   $0x1,0x50(%rsp)
  add    %r12d,0x5c(%rsp)
  subl   $0x1,0x18(%rsp)
  mov    0x70(%rsp),%rdi
  add    %rdi,0x10(%rsp)
  mov    0x68(%rsp),%rdi
  add    %rdi,0x28(%rsp)
  add    0x78(%rsp),%r14
  cmp    0x80(%rsp),%rbp
  je     L252
L158:
  mov    %ebp,0x58(%rsp)
  mov    %ebp,%edx
  cmpl   $0x0,0x30(%rsp)
  jne    L327
L325:
  mov    0x10(%rsp),%rax
  lea    (%r15,%rax,8),%rbx
  mov    %r12d,%edi
  sub    0x58(%rsp),%edi
  mov    %rbx,%rsi
  mov    $0x0,%eax
  call   <lm_enorm@plt>
  test   %eax,%eax
  jne    L304
  movq   $0x0,0x0(%r13,%rbp,8)
  jmp    L173
L252:
  add    $0xa8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: parse_data
arguments: label: D60
type_guessed: f32[2]
name: parse_data
arguments: label: D23
type_guessed: f32[4]
name: parse_data
arguments: label: D4
type_guessed: f64
name: parse_data
arguments: label: D39
type_guessed: byte[8]
name: parse_data
arguments: label: D35
type_guessed: f32[2]

tool: {"D60": [0.0,1.875]}

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

tool: D4: 0.05

tool: {"D39": [0x5e,0xad,0xe8,0xb7,0x5a,0xfe,0x8f,0x3c]}

tool: {"D35": [0.0,0.0]}

assistant: ```c
void lm_qrfac(int m, int n, double *a, int pivot, int *ipvt, double *rdiag, double *acnorm, double *wa) {
  int i, j, k, kmax, minmn;
  double ajnorm, sum, temp;
  static double p05 = 0.05;
  for (j = 0; j < n; j++) {
    acnorm[j] = lm_enorm(m, &a[j * m]);
    rdiag[j] = acnorm[j];
    wa[j] = rdiag[j];
    if (pivot)
      ipvt[j] = j;
  }
  minmn = (((m) <= (n)) ? (m) : (n));
  for (j = 0; j < minmn; j++) {
    if (!pivot)
      goto pivot_ok;
    kmax = j;
    for (k = j + 1; k < n; k++)
      if (rdiag[k] > rdiag[kmax])
        kmax = k;
    if (kmax == j)
      goto pivot_ok;
    for (i = 0; i < m; i++) {
      temp = a[j * m + i];
      a[j * m + i] = a[kmax * m + i];
      a[kmax * m + i] = temp;
    }
    rdiag[kmax] = rdiag[j];
    wa[kmax] = wa[j];
    k = ipvt[j];
    ipvt[j] = ipvt[kmax];
    ipvt[kmax] = k;
  pivot_ok:
    ajnorm = lm_enorm(m - j, &a[j * m + j]);
    if (ajnorm == 0.) {
      rdiag[j] = 0;
      continue;
    }
    if (a[j * m + j] < 0.)
      ajnorm = -ajnorm;
    for (i = j; i < m; i++)
      a[j * m + i] /= ajnorm;
    a[j * m + j] += 1;
    for (k = j + 1; k < n; k++) {
      sum = 0;
      for (i = j; i < m; i++)
        sum += a[j * m + i] * a[k * m + i];
      temp = sum / a[j + m * j];
      for (i = j; i < m; i++)
        a[k * m + i] -= temp * a[j * m + i];
      if (pivot && rdiag[k] != 0.) {
        temp = a[m * k + j] / rdiag[k];
        temp = (((0.) >= (1 - temp * temp)) ? (0.) : (1 - temp * temp));
        rdiag[k] *= sqrt(temp);
        temp = rdiag[k] / wa[k];
        if (p05 * (temp) * (temp) <= .555e-16) {
          rdiag[k] = lm_enorm(m - j - 1, &a[m * k + j + 1]);
          wa[k] = rdiag[k];
        }
      }
    }
    rdiag[j] = -ajnorm;
  }
}
```