user: What is the c source code of the assembly code below?

```asm
<givens>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %edi,-0x24(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %rcx,-0x40(%rbp)
  cmpl   $0x1,-0x24(%rbp)
  jg     L23
  mov    -0x38(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    -0x40(%rbp),%rax
  movsd  0x8(%rax),%xmm0
  movsd  %xmm0,(%rdx)
  mov    -0x30(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rax
  add    $0x8,%rax
  movsd  D2(%rip),%xmm0
  movsd  %xmm0,(%rax)
  jmp    L33
L23:
  movl   $0x1,-0x14(%rbp)
  movl   $0x1,-0x1c(%rbp)
  jmp    L6
L3:
  movl   $0x1,-0x18(%rbp)
  jmp    L36
L10:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rax,%rdx
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x30(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rcx
  mov    -0x18(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x1c(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x1c(%rbp)
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rax,%rdx
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x30(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rcx
  mov    -0x14(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x18(%rbp)
L36:
  mov    -0x18(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  jl     L10
  mov    -0x1c(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x1c(%rbp)
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rax,%rdx
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x30(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rcx
  mov    -0x14(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x14(%rbp)
L6:
  mov    -0x14(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jle    L3
  mov    -0x24(%rbp),%eax
  mov    %eax,%esi
  mov    $0x1,%edi
  call   <dvector@plt>
  mov    %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rcx
  mov    -0x38(%rbp),%rdx
  mov    -0x24(%rbp),%esi
  mov    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <tred2@plt>
  mov    -0x30(%rbp),%rcx
  mov    -0x24(%rbp),%edx
  mov    -0x10(%rbp),%rsi
  mov    -0x38(%rbp),%rax
  mov    %rax,%rdi
  call   <tqli@plt>
  mov    -0x10(%rbp),%rax
  mov    $0x1,%esi
  mov    %rax,%rdi
  call   <free_dvector@plt>
  movl   $0x1,-0x14(%rbp)
  jmp    L78
L39:
  movl   $0x1,-0x18(%rbp)
  jmp    L76
L42:
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x18(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x14(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rax,%rdx
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x30(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rcx
  mov    -0x18(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x14(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x18(%rbp)
L76:
  mov    -0x18(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  jl     L42
  addl   $0x1,-0x14(%rbp)
L78:
  mov    -0x14(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jle    L39
L33:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_label: D2
data_type: f64

tool: D2: 1

assistant: ```c
void givens(int nx, double **vect, double *root, double *a) {
  int l, j, k;
  double *e;
  if (nx <= 1) {
    root[1] = a[1];
    vect[1][1] = 1.0;
    return;
  }
  for (k = 1, l = 1; k <= nx; k++) {
    for (j = 1; j < k; j++) {
      vect[k][j] = a[l];
      vect[j][k] = a[l++];
    }
    vect[k][k] = a[l++];
  }
  e = dvector(1, nx);
  tred2(vect, nx, root, e);
  tqli(root, e, nx, vect);
  free_dvector(e, 1);
  for (k = 1; k <= nx; k++)
    for (j = 1; j < k; j++) {
      double p = vect[k][j];
      vect[k][j] = vect[j][k];
      vect[j][k] = p;
    }
}
```