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

```asm
<xorgqr>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x68,%rsp
  mov    %edi,0x20(%rsp)
  mov    %esi,0x24(%rsp)
  mov    %rdx,%r13
  mov    %ecx,0xc(%rsp)
  mov    %r8,%r14
  mov    %r9,0x48(%rsp)
  cmp    %esi,%edi
  jle    L177
  lea    0x0(,%rdi,8),%r15d
  movslq %ecx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    %rdx,0x10(%rsp)
  mov    %esi,%eax
  imul   %ecx,%eax
  cltq
  lea    0x0(%r13,%rax,8),%r12
  lea    0x8(%rdx),%rcx
  mov    %rcx,0x18(%rsp)
  movslq %esi,%rdx
  add    %rdx,%rax
  lea    0x0(%r13,%rax,8),%rbp
  mov    %esi,%ebx
  mov    %r13,0x28(%rsp)
  mov    %edi,%r13d
L178:
  mov    %r15d,%edx
  mov    $0x0,%esi
  mov    %r12,%rdi
  call   <memset@plt>
  mov    D13(%rip),%rax
  mov    %rax,0x0(%rbp)
  add    $0x1,%ebx
  add    0x10(%rsp),%r12
  add    0x18(%rsp),%rbp
  cmp    %ebx,%r13d
  jne    L178
  mov    0x28(%rsp),%r13
L177:
  mov    0x24(%rsp),%edi
  lea    -0x1(%rdi),%eax
  test   %edi,%edi
  jle    L100
  movslq %edi,%rbp
  mov    0xc(%rsp),%esi
  mov    %esi,%ecx
  not    %ecx
  mov    %ecx,0x3c(%rsp)
  imul   %esi,%eax
  lea    (%rdi,%rax,1),%ebx
  mov    %ebx,0x10(%rsp)
  mov    0x20(%rsp),%edx
  sub    %edi,%edx
  add    %edx,%ebx
  mov    %ebx,0x18(%rsp)
  movslq %ecx,%rcx
  mov    %rcx,0x40(%rsp)
  cltq
  lea    (%rax,%rbp,1),%r15
  lea    -0x1(%rdx),%eax
  mov    %eax,0x28(%rsp)
  lea    -0x1(%rdi),%eax
  mov    %rbp,%rdi
  sub    %rax,%rdi
  mov    %rdi,0x30(%rsp)
  movslq %esi,%rax
  mov    %rax,0x50(%rsp)
  shl    $0x3,%rax
  mov    %rax,0x58(%rsp)
  jmp    L93
L222:
  mov    0x20(%rsp),%eax
  mov    %eax,%ebx
  sub    %ebp,%ebx
  lea    0x1(%rax),%r12d
  sub    %ebp,%r12d
  movslq 0x18(%rsp),%rax
  lea    0x0(%r13,%rax,8),%rax
  pxor   %xmm1,%xmm1
  movapd %xmm1,%xmm0
L94:
  ucomisd -0x8(%rax),%xmm1
  jp     L218
  ucomisd -0x8(%rax),%xmm0
  jne    L218
  sub    $0x8,%rax
  sub    $0x1,%r12d
  jne    L94
L218:
  mov    0x10(%rsp),%eax
  add    0xc(%rsp),%eax
  mov    %eax,0x24(%rsp)
  pxor   %xmm0,%xmm0
  mov    $0x2,%esi
  mov    $0x1,%edi
  jmp    L337
L291:
  add    $0x1,%eax
L333:
  cmp    %eax,%edx
  jle    L91
  movslq %eax,%rcx
  pxor   %xmm2,%xmm2
  ucomisd -0x8(%r13,%rcx,8),%xmm2
  jp     L40
  ucomisd -0x8(%r13,%rcx,8),%xmm0
  je     L291
L40:
  mov    %edi,%eax
  jmp    L141
L91:
  sub    $0x1,%ebx
  mov    %esi,%eax
L141:
  cmp    $0x1,%eax
  je     L313
  test   %ebx,%ebx
  jle    L313
L337:
  lea    -0x1(%rbx),%edx
  imul   0xc(%rsp),%edx
  add    0x24(%rsp),%edx
  mov    %edx,%eax
  add    %r12d,%edx
  jmp    L333
L313:
  test   %r12d,%r12d
  jle    L216
  test   %ebx,%ebx
  jne    L204
L54:
  movsd  -0x8(%r14,%rbp,8),%xmm0
  xorpd  D18(%rip),%xmm0
  sub    $0x8,%rsp
  mov    0x14(%rsp),%eax
  push   %rax
  mov    0x34(%rsp),%r9d
  mov    %r13,%r8
  mov    0x58(%rsp),%rcx
  mov    0x48(%rsp),%edx
  mov    %ebx,%esi
  mov    %r12d,%edi
  call   <xgerc@plt>
  add    $0x10,%rsp
  jmp    L216
L204:
  lea    0x0(,%rbx,8),%edx
  mov    $0x0,%esi
  mov    0x48(%rsp),%rdi
  call   <memset@plt>
  lea    -0x1(%rbx),%r9d
  imul   0xc(%rsp),%r9d
  mov    0x24(%rsp),%ecx
  add    %ecx,%r9d
  mov    0x48(%rsp),%rsi
  lea    (%r12,%rcx,1),%r8d
  movslq %ecx,%rax
  lea    -0x8(%r13,%rax,8),%rdi
  mov    %r15,%rdx
  sub    %rax,%rdx
  mov    %r12d,%r10d
  shl    $0x3,%r10
  jmp    L292
L52:
  cmp    %r8d,%ecx
  jge    L70
  lea    (%r10,%rdi,1),%r11
  mov    %rdi,%rax
  pxor   %xmm1,%xmm1
L335:
  movsd  (%rax),%xmm0
  mulsd  (%rax,%rdx,8),%xmm0
  addsd  %xmm0,%xmm1
  add    $0x8,%rax
  cmp    %r11,%rax
  jne    L335
L255:
  addsd  (%rsi),%xmm1
  movsd  %xmm1,(%rsi)
  mov    0xc(%rsp),%eax
  add    %eax,%ecx
  add    $0x8,%rsi
  add    %eax,%r8d
  add    0x58(%rsp),%rdi
  sub    0x50(%rsp),%rdx
L292:
  cmp    %r9d,%ecx
  setle  %al
  cmpl   $0x0,0xc(%rsp)
  js     L164
L215:
  test   %al,%al
  jne    L52
  jmp    L54
L70:
  pxor   %xmm1,%xmm1
  jmp    L255
L164:
  cmp    %r9d,%ecx
  setge  %al
  jmp    L215
L131:
  movsd  -0x8(%r14,%rbp,8),%xmm0
  xorpd  D18(%rip),%xmm0
  mulsd  (%rax),%xmm0
  movsd  %xmm0,(%rax)
  add    $0x8,%rax
  cmp    %rdx,%rax
  jne    L131
L119:
  movsd  D13(%rip),%xmm0
  subsd  -0x8(%r14,%rbp,8),%xmm0
  movsd  %xmm0,-0x8(%r13,%r15,8)
  cmp    0x30(%rsp),%rbp
  je     L100
  lea    0x0(,%r15,8),%rdx
  lea    0x0(%r13,%rdx,1),%rax
  lea    -0x8(%r13,%rdx,1),%rdx
  lea    -0x2(%rbp),%ecx
  shl    $0x3,%rcx
  sub    %rcx,%rdx
L81:
  movq   $0x0,-0x10(%rax)
  sub    $0x8,%rax
  cmp    %rdx,%rax
  jne    L81
  sub    $0x1,%rbp
  mov    0x3c(%rsp),%edi
  add    %edi,0x10(%rsp)
  mov    0xc(%rsp),%edi
  sub    %edi,0x18(%rsp)
  add    0x40(%rsp),%r15
  addl   $0x1,0x28(%rsp)
L93:
  mov    0x10(%rsp),%eax
  mov    %eax,0x38(%rsp)
  cmp    %ebp,0x20(%rsp)
  jle    L119
  mov    D13(%rip),%rax
  mov    %rax,-0x8(%r13,%r15,8)
  pxor   %xmm0,%xmm0
  ucomisd -0x8(%r14,%rbp,8),%xmm0
  jp     L222
  jne    L222
L216:
  mov    0x10(%rsp),%eax
  add    $0x1,%eax
  cmp    %eax,0x18(%rsp)
  jl     L119
  cltq
  lea    -0x8(%r13,%rax,8),%rax
  mov    0x28(%rsp),%edx
  add    %r15,%rdx
  lea    0x8(%r13,%rdx,8),%rdx
  jmp    L131
L100:
  add    $0x68,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: retrieve_data
arguments: tag: D13
type: f64
name: retrieve_data
arguments: tag: D18
type: f32[4]

tool: D13: 1

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

assistant: ```c
void xorgqr(int n, int k, double A_data[], int lda, const double tau_data[], double *work_data) {
  double c;
  int b_i;
  int c_i;
  int exitg1;
  int i;
  int i1;
  int ia;
  int iac;
  int iaii;
  int ic0;
  int itau;
  int ix;
  int lastc;
  int lastv;
  char exitg2;
  i = n - 1;
  for (b_i = k; b_i <= i; b_i++) {
    ia = b_i * lda;
    i1 = n - 1;
    memset(&A_data[ia], 0, (i1 + 1) * sizeof(double));
    A_data[ia + b_i] = 1.0;
  }
  itau = k - 1;
  for (c_i = k; c_i >= 1; c_i--) {
    iaii = c_i + (c_i - 1) * lda;
    if (c_i < n) {
      A_data[iaii - 1] = 1.0;
      ic0 = iaii + lda;
      if (tau_data[itau] != 0.0) {
        lastv = (n - c_i) + 1;
        b_i = (iaii + n) - c_i;
        while ((lastv > 0) && (A_data[b_i - 1] == 0.0)) {
          lastv--;
          b_i--;
        }
        lastc = n - c_i;
        exitg2 = 0;
        while ((!exitg2) && (lastc > 0)) {
          b_i = ic0 + (lastc - 1) * lda;
          ia = b_i;
          do {
            exitg1 = 0;
            if (ia <= (b_i + lastv) - 1) {
              if (A_data[ia - 1] != 0.0)
                exitg1 = 1;
              else
                ia++;
            } else {
              lastc--;
              exitg1 = 2;
            }
          } while (exitg1 == 0);
          if (exitg1 == 1)
            exitg2 = 1;
        }
      } else {
        lastv = 0;
        lastc = 0;
      }
      if (lastv > 0) {
        if (lastc != 0) {
          memset(&work_data[0], 0, lastc * sizeof(double));
          b_i = 0;
          i = ic0 + lda * (lastc - 1);
          for (iac = ic0; lda < 0 ? iac >= i : iac <= i; iac += lda) {
            ix = iaii;
            c = 0.0;
            i1 = (iac + lastv) - 1;
            for (ia = iac; ia <= i1; ia++) {
              c += A_data[ia - 1] * A_data[ix - 1];
              ix++;
            }
            work_data[b_i] += c;
            b_i++;
          }
        }
        xgerc(lastv, lastc, -tau_data[itau], iaii, work_data, A_data, ic0, lda);
      }
    }
    if (c_i < n) {
      b_i = iaii + 1;
      i = (iaii + n) - c_i;
      for (ix = b_i; ix <= i; ix++)
        A_data[ix - 1] *= -tau_data[itau];
    }
    A_data[iaii - 1] = 1.0 - tau_data[itau];
    for (b_i = 0; b_i <= c_i - 2; b_i++)
      A_data[(iaii - b_i) - 2] = 0.0;
    itau--;
  }
}
```