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

```asm
<denseGETRS>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x48(%rbp)
  mov    %rsi,-0x50(%rbp)
  mov    %rdx,-0x58(%rbp)
  mov    %rcx,-0x60(%rbp)
  movq   $0x0,-0x30(%rbp)
  jmp    L47
L69:
  mov    -0x30(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  cmp    -0x30(%rbp),%rax
  je     L30
  mov    -0x30(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  mov    -0x10(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rax,%rdx
  mov    -0x30(%rbp),%rax
  lea    0x0(,%rax,8),%rcx
  mov    -0x60(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x10(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,(%rax)
L30:
  addq   $0x1,-0x30(%rbp)
L47:
  mov    -0x30(%rbp),%rax
  cmp    -0x50(%rbp),%rax
  jb     L69
  movq   $0x0,-0x28(%rbp)
  jmp    L78
L0:
  mov    -0x28(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x28(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,-0x38(%rbp)
  jmp    L80
L71:
  mov    -0x38(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x38(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  mov    -0x28(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mulsd  %xmm2,%xmm1
  mov    -0x38(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  subsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addq   $0x1,-0x38(%rbp)
L80:
  mov    -0x38(%rbp),%rax
  cmp    -0x50(%rbp),%rax
  jb     L71
  addq   $0x1,-0x28(%rbp)
L78:
  mov    -0x50(%rbp),%rax
  sub    $0x1,%rax
  cmp    %rax,-0x28(%rbp)
  jb     L0
  mov    -0x50(%rbp),%rax
  sub    $0x1,%rax
  mov    %rax,-0x20(%rbp)
  jmp    L46
L9:
  mov    -0x20(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x20(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x20(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x20(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  movq   $0x0,-0x38(%rbp)
  jmp    L75
L29:
  mov    -0x38(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x38(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  mov    -0x20(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mulsd  %xmm2,%xmm1
  mov    -0x38(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  subsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addq   $0x1,-0x38(%rbp)
L75:
  mov    -0x38(%rbp),%rax
  cmp    -0x20(%rbp),%rax
  jb     L29
  subq   $0x1,-0x20(%rbp)
L46:
  cmpq   $0x0,-0x20(%rbp)
  jne    L9
  mov    -0x60(%rbp),%rax
  movsd  (%rax),%xmm0
  mov    -0x48(%rbp),%rax
  mov    (%rax),%rax
  movsd  (%rax),%xmm1
  divsd  %xmm1,%xmm0
  mov    -0x60(%rbp),%rax
  movsd  %xmm0,(%rax)
  nop
  pop    %rbp
  ret
```

assistant: ```c
void denseGETRS(double **a, size_t n, long int *p, double *b) {
  size_t i, pk;
  double *col_k, tmp;
  for (size_t k = 0; k < n; k++) {
    pk = (size_t)p[k];
    if (pk != k) {
      tmp = b[k];
      b[k] = b[pk];
      b[pk] = tmp;
    }
  }
  for (size_t k = 0; k < n - 1; k++) {
    col_k = a[k];
    for (i = k + 1; i < n; i++)
      b[i] -= col_k[i] * b[k];
  }
  for (size_t k = n - 1; k > 0; k--) {
    col_k = a[k];
    b[k] /= col_k[k];
    for (i = 0; i < k; i++)
      b[i] -= col_k[i] * b[k];
  }
  b[0] /= a[0][0];
}
```