user: Please show me the C implementation that matches the assembly code listed below:

```asm
<qrupdate>:
  endbr64
  push   %r15
  mov    %rdx,%r15
  push   %r14
  mov    %esi,%r14d
  push   %r13
  mov    %rdi,%r13
  push   %r12
  push   %rbp
  mov    %rcx,%rbp
  push   %rbx
  sub    $0x38,%rsp
  cmp    $0x1,%esi
  jle    L95
  lea    0x1(%rsi),%esi
  mov    $0x1,%eax
  pxor   %xmm2,%xmm2
  movslq %esi,%rsi
  shl    $0x3,%rsi
  lea    (%rdi,%rsi,1),%rdx
  xchg   %ax,%ax
L193:
  add    $0x1,%eax
  movq   $0x0,-0x8(%rdx)
  add    %rsi,%rdx
  cmp    %eax,%r14d
  jne    L193
  lea    -0x1(%r14),%r12d
  movslq %r12d,%rax
  ucomisd (%r15,%rax,8),%xmm2
  lea    0x0(,%rax,8),%rcx
  mov    %rcx,0x28(%rsp)
  jp     L23
  jne    L23
  lea    -0x2(%r14),%eax
  xor    %edi,%edi
  cltq
  nopl   0x0(%rax)
L20:
  ucomisd (%r15,%rax,8),%xmm2
  mov    %eax,%r12d
  setnp  %dl
  cmovne %edi,%edx
  test   %eax,%eax
  setg   %sil
  sub    $0x1,%rax
  test   %sil,%dl
  jne    L20
L65:
  mov    %r12d,%edx
  pxor   %xmm2,%xmm2
  sub    $0x1,%edx
  js     L138
L197:
  movq   D14(%rip),%xmm6
  lea    0x1(%rdx),%eax
  cltq
  lea    (%r15,%rax,8),%rbx
  movaps %xmm6,(%rsp)
  jmp    L25
  nopl   (%rax)
L127:
  movsd  (%rbx),%xmm0
  andpd  D15(%rip),%xmm0
L239:
  sub    $0x1,%edx
  movsd  %xmm0,-0x8(%rbx)
  sub    $0x8,%rbx
  cmp    $0xffffffff,%edx
  je     L138
L25:
  movsd  (%rbx),%xmm1
  movsd  -0x8(%rbx),%xmm0
  mov    %r14d,%esi
  mov    %r13,%rdi
  xorpd  (%rsp),%xmm1
  mov    %edx,0x18(%rsp)
  movsd  %xmm2,0x20(%rsp)
  call   <jrotate@plt>
  movsd  -0x8(%rbx),%xmm0
  movsd  0x20(%rsp),%xmm2
  mov    0x18(%rsp),%edx
  ucomisd %xmm2,%xmm0
  jp     L166
  je     L127
L166:
  movsd  (%rbx),%xmm1
  mulsd  %xmm0,%xmm0
  mulsd  %xmm1,%xmm1
  addsd  %xmm1,%xmm0
  ucomisd %xmm0,%xmm2
  ja     L50
  sqrtsd %xmm0,%xmm0
  jmp    L239
  nopw   0x0(%rax,%rax,1)
L138:
  test   %r14d,%r14d
  jle    L12
  movslq %r14d,%rdx
  lea    0x8(%r15),%rsi
  lea    0x0(%r13,%rdx,8),%rax
  cmp    %rax,%r15
  setae  %al
  cmp    %rsi,%r13
  setae  %sil
  or     %sil,%al
  je     L163
  lea    0x8(%rbp),%rax
  cmp    %rax,%r13
  setne  %sil
  cmp    $0x1,%r14d
  setne  %al
  test   %al,%sil
  je     L163
  movsd  (%r15),%xmm1
  mov    %r14d,%edx
  xor    %eax,%eax
  shr    %edx
  unpcklpd %xmm1,%xmm1
  shl    $0x4,%rdx
  nopw   0x0(%rax,%rax,1)
L132:
  movupd 0x0(%rbp,%rax,1),%xmm0
  movupd 0x0(%r13,%rax,1),%xmm5
  mulpd  %xmm1,%xmm0
  addpd  %xmm5,%xmm0
  movups %xmm0,0x0(%r13,%rax,1)
  add    $0x10,%rax
  cmp    %rax,%rdx
  jne    L132
  mov    %r14d,%eax
  and    $0xfffffffe,%eax
  test   $0x1,%r14b
  je     L12
  movsd  0x0(%rbp,%rax,8),%xmm0
  lea    0x0(%r13,%rax,8),%rdx
  mulsd  (%r15),%xmm0
  addsd  (%rdx),%xmm0
  movsd  %xmm0,(%rdx)
L12:
  test   %r12d,%r12d
  jle    L133
  mov    0x28(%rsp),%rax
  movq   D14(%rip),%xmm7
  xor    %ebx,%ebx
  lea    0x10(%rax),%rcx
  lea    0x8(%r13,%rax,1),%rbp
  movaps %xmm7,(%rsp)
  mov    %rcx,0x18(%rsp)
  movslq %r14d,%rcx
  neg    %rcx
  lea    0x0(,%rcx,8),%r15
  nopl   0x0(%rax)
L159:
  movsd  0x0(%rbp),%xmm1
  xorpd  (%rsp),%xmm1
  mov    %ebx,%edx
  mov    %r14d,%esi
  movsd  0x0(%rbp,%r15,1),%xmm0
  mov    %r13,%rdi
  add    $0x1,%ebx
  call   <jrotate@plt>
  add    0x18(%rsp),%rbp
  cmp    %r12d,%ebx
  jne    L159
L133:
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L163:
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L111:
  movsd  0x0(%rbp,%rax,8),%xmm0
  mulsd  (%r15),%xmm0
  addsd  0x0(%r13,%rax,8),%xmm0
  movsd  %xmm0,0x0(%r13,%rax,8)
  add    $0x1,%rax
  cmp    %rax,%rdx
  jne    L111
  jmp    L12
  nop
L95:
  lea    -0x1(%rsi),%r12d
  movslq %r12d,%rax
  shl    $0x3,%rax
  mov    %rax,0x28(%rsp)
  jmp    L65
  nopl   (%rax)
L23:
  lea    -0x2(%r14),%edx
  jmp    L197
L50:
  mov    %edx,0x18(%rsp)
  movsd  %xmm2,0x20(%rsp)
  call   <sqrt@plt>
  movsd  0x20(%rsp),%xmm2
  mov    0x18(%rsp),%edx
  jmp    L239
```

tool_calls: name: parse_data
arguments: data_tag: D14
data_type: byte[8]
name: parse_data
arguments: data_tag: D15
data_type: qword[2]

tool: {"D14": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80]}

tool: {"D15": [0x7fffffffffffffff,0x0000000000000000]}

assistant: ```c
void qrupdate(double *R, int N, double *u, double *v) {
  int i, j, k, l;
  for (i = 1; i < N; ++i) {
    R[i * N + i - 1] = 0;
  }
  k = N - 1;
  while (u[k] == 0 && k > 0) {
    k--;
  }
  for (i = k - 1; i >= 0; --i) {
    jrotate(R, N, u[i], -u[i + 1], i);
    if (u[i] == 0) {
      u[i] = fabs(u[i + 1]);
    } else {
      u[i] = sqrt(u[i] * u[i] + u[i + 1] * u[i + 1]);
    }
  }
  for (i = 0; i < N; ++i) {
    R[i] += u[0] * v[i];
  }
  for (i = 0; i < k; ++i) {
    j = i * N;
    l = j + N;
    jrotate(R, N, R[j + i], -R[l + i], i);
  }
}
```