user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<qrupdate>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,%rbp
  mov    %esi,%r13d
  mov    %rdx,%r15
  mov    %rcx,0x10(%rsp)
  cmp    $0x1,%esi
  jle    L111
  movslq %esi,%rax
  lea    0x8(,%rax,8),%rcx
  lea    (%rdi,%rax,8),%rdx
  mov    $0x1,%eax
L44:
  movq   $0x0,(%rdx)
  add    $0x1,%eax
  add    %rcx,%rdx
  cmp    %eax,%r13d
  jne    L44
  lea    -0x1(%r13),%esi
  mov    %esi,0xc(%rsp)
  movslq %esi,%rax
  lea    0x0(,%rax,8),%rcx
  mov    %rcx,0x18(%rsp)
  pxor   %xmm0,%xmm0
  ucomisd (%r15,%rax,8),%xmm0
  setnp  %al
  mov    $0x0,%edx
  cmovne %edx,%eax
  test   %al,%al
  je     L37
  test   %esi,%esi
  jle    L37
L73:
  lea    -0x2(%r13),%eax
  cltq
  pxor   %xmm0,%xmm0
  mov    $0x0,%esi
L161:
  mov    %eax,0xc(%rsp)
  ucomisd (%r15,%rax,8),%xmm0
  setnp  %dl
  cmovne %esi,%edx
  test   %eax,%eax
  setg   %cl
  sub    $0x1,%rax
  test   %cl,%dl
  jne    L161
L103:
  mov    0xc(%rsp),%r12d
  sub    $0x1,%r12d
  js     L34
L20:
  lea    0x1(%r12),%eax
  cltq
  lea    (%r15,%rax,8),%rbx
  jmp    L71
L111:
  lea    -0x1(%rsi),%ecx
  mov    %ecx,0xc(%rsp)
  movslq %ecx,%rax
  lea    0x0(,%rax,8),%rdi
  mov    %rdi,0x18(%rsp)
  pxor   %xmm0,%xmm0
  ucomisd (%rdx,%rax,8),%xmm0
  setnp  %al
  mov    $0x0,%edx
  cmovne %edx,%eax
  test   %al,%al
  je     L103
  test   %ecx,%ecx
  jg     L73
  jmp    L103
L47:
  movsd  (%r14),%xmm1
  mulsd  %xmm0,%xmm0
  mulsd  %xmm1,%xmm1
  addsd  %xmm1,%xmm0
  pxor   %xmm3,%xmm3
  ucomisd %xmm0,%xmm3
  ja     L190
  sqrtsd %xmm0,%xmm0
L198:
  movsd  %xmm0,-0x8(%r14)
  sub    $0x1,%r12d
  sub    $0x8,%rbx
  cmp    $0xffffffff,%r12d
  je     L34
L71:
  mov    %rbx,%r14
  movsd  (%rbx),%xmm1
  xorpd  D20(%rip),%xmm1
  movsd  -0x8(%rbx),%xmm0
  mov    %r12d,%edx
  mov    %r13d,%esi
  mov    %rbp,%rdi
  call   <jrotate@plt>
  movsd  -0x8(%rbx),%xmm0
  pxor   %xmm2,%xmm2
  ucomisd %xmm2,%xmm0
  jp     L47
  jne    L47
  movsd  (%rbx),%xmm0
  andpd  D18(%rip),%xmm0
  jmp    L198
L190:
  call   <sqrt@plt>
  jmp    L198
L34:
  test   %r13d,%r13d
  jle    L78
  mov    %r13d,%edx
  mov    $0x0,%eax
L25:
  movsd  (%r15),%xmm0
  mov    0x10(%rsp),%rdi
  mulsd  (%rdi,%rax,8),%xmm0
  addsd  0x0(%rbp,%rax,8),%xmm0
  movsd  %xmm0,0x0(%rbp,%rax,8)
  add    $0x1,%rax
  cmp    %rdx,%rax
  jne    L25
L78:
  cmpl   $0x0,0xc(%rsp)
  jle    L117
  mov    0x18(%rsp),%rax
  lea    0x10(%rax),%r15
  lea    0x8(%rbp,%rax,1),%r12
  movslq %r13d,%r14
  neg    %r14
  shl    $0x3,%r14
  mov    $0x0,%ebx
L203:
  movsd  (%r12),%xmm1
  xorpd  D20(%rip),%xmm1
  movsd  (%r12,%r14,1),%xmm0
  mov    %ebx,%edx
  mov    %r13d,%esi
  mov    %rbp,%rdi
  call   <jrotate@plt>
  add    $0x1,%ebx
  add    %r15,%r12
  cmp    %ebx,0xc(%rsp)
  jne    L203
L117:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L37:
  lea    -0x2(%r13),%r12d
  jmp    L20
```

tool_calls: name: unpack_data
arguments: data_label: D20
datatype: byte[16]
name: unpack_data
arguments: data_label: D18
datatype: qword[2]

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

tool: {"D18": [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);
  }
}
```