user: What would the C source look like for the assembly code provided here:

```asm
<_fff_pth_element>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x8,%rsp
  mov    %rdi,-0x68(%rbp)
  mov    %rsi,-0x70(%rbp)
  mov    %rdx,-0x78(%rbp)
  mov    %rcx,-0x80(%rbp)
  movq   $0x0,-0x18(%rbp)
  movq   $0x0,-0x28(%rbp)
  mov    -0x80(%rbp),%rax
  sub    $0x1,%rax
  mov    %rax,-0x20(%rbp)
  jmp    L60
L102:
  movl   $0x0,-0x54(%rbp)
  mov    -0x78(%rbp),%rax
  imul   -0x28(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x48(%rbp)
  mov    -0x78(%rbp),%rax
  imul   -0x20(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x40(%rbp)
  mov    -0x48(%rbp),%rax
  movsd  (%rax),%xmm0
  mov    -0x40(%rbp),%rax
  movsd  (%rax),%xmm1
  comisd %xmm1,%xmm0
  jbe    L33
  mov    -0x48(%rbp),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  mov    -0x40(%rbp),%rax
  movsd  (%rax),%xmm0
  mov    -0x48(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    -0x40(%rbp),%rax
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  jmp    L175
L33:
  mov    -0x48(%rbp),%rax
  movsd  (%rax),%xmm0
  mov    -0x40(%rbp),%rax
  movsd  (%rax),%xmm1
  ucomisd %xmm1,%xmm0
  jp     L175
  ucomisd %xmm1,%xmm0
  jne    L175
  movl   $0x1,-0x54(%rbp)
L175:
  mov    -0x48(%rbp),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x50(%rbp)
  mov    -0x28(%rbp),%rax
  cmp    -0x20(%rbp),%rax
  jne    L35
  movsd  -0x50(%rbp),%xmm0
  jmp    L147
L35:
  mov    -0x78(%rbp),%rax
  shl    $0x3,%rax
  add    %rax,-0x48(%rbp)
  mov    -0x28(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,-0x38(%rbp)
  mov    -0x20(%rbp),%rax
  mov    %rax,-0x30(%rbp)
  movq   $0x0,-0x10(%rbp)
  jmp    L182
L32:
  addq   $0x1,-0x38(%rbp)
  mov    -0x78(%rbp),%rax
  shl    $0x3,%rax
  add    %rax,-0x48(%rbp)
L155:
  mov    -0x48(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  -0x50(%rbp),%xmm0
  comisd %xmm1,%xmm0
  ja     L32
  jmp    L72
L121:
  subq   $0x1,-0x30(%rbp)
  mov    -0x78(%rbp),%rax
  shl    $0x3,%rax
  neg    %rax
  add    %rax,-0x40(%rbp)
L72:
  mov    -0x40(%rbp),%rax
  movsd  (%rax),%xmm0
  comisd -0x50(%rbp),%xmm0
  ja     L121
  mov    -0x30(%rbp),%rax
  cmp    -0x38(%rbp),%rax
  ja     L112
  movq   $0x1,-0x10(%rbp)
  jmp    L15
L112:
  mov    -0x48(%rbp),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  mov    -0x40(%rbp),%rax
  movsd  (%rax),%xmm0
  mov    -0x48(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    -0x40(%rbp),%rax
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  subq   $0x1,-0x30(%rbp)
  mov    -0x78(%rbp),%rax
  shl    $0x3,%rax
  neg    %rax
  add    %rax,-0x40(%rbp)
  addq   $0x1,-0x38(%rbp)
  mov    -0x78(%rbp),%rax
  shl    $0x3,%rax
  add    %rax,-0x48(%rbp)
L15:
  cmpl   $0x0,-0x54(%rbp)
  je     L182
  mov    -0x30(%rbp),%rax
  cmp    -0x20(%rbp),%rax
  jne    L182
  subq   $0x1,-0x30(%rbp)
  mov    -0x78(%rbp),%rax
  shl    $0x3,%rax
  neg    %rax
  add    %rax,-0x40(%rbp)
  mov    -0x28(%rbp),%rax
  imul   -0x78(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  mov    -0x28(%rbp),%rax
  imul   -0x78(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x68(%rbp),%rax
  add    %rax,%rdx
  mov    -0x40(%rbp),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,(%rdx)
  mov    -0x40(%rbp),%rax
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  movq   $0x1,-0x10(%rbp)
L182:
  cmpq   $0x0,-0x10(%rbp)
  je     L155
  mov    -0x30(%rbp),%rax
  cmp    -0x70(%rbp),%rax
  jbe    L87
  mov    -0x30(%rbp),%rax
  mov    %rax,-0x20(%rbp)
  jmp    L60
L87:
  mov    -0x30(%rbp),%rax
  cmp    -0x70(%rbp),%rax
  jae    L163
  mov    -0x38(%rbp),%rax
  mov    %rax,-0x28(%rbp)
  jmp    L60
L163:
  movq   $0x1,-0x18(%rbp)
L60:
  cmpq   $0x0,-0x18(%rbp)
  je     L102
  movsd  -0x50(%rbp),%xmm0
L147:
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  leave
  ret
```

assistant: ```c
double _fff_pth_element(double *x, size_t p, size_t stride, size_t n) {
  double a, tmp;
  double *bufl, *bufr;
  size_t i, j, il, jr, stop1, stop2;
  int same_extremities;
  stop1 = 0;
  il = 0;
  jr = n - 1;
  while (stop1 == 0) {
    same_extremities = 0;
    bufl = x + stride * il;
    bufr = x + stride * jr;
    if (*bufl > *bufr) {
      tmp = (*bufl);
      (*bufl) = (*bufr);
      (*bufr) = tmp;
    } else if (*bufl == *bufr)
      same_extremities = 1;
    a = *bufl;
    if (il == jr)
      return a;
    bufl += stride;
    i = il + 1;
    j = jr;
    stop2 = 0;
    while (stop2 == 0) {
      while (*bufl < a) {
        i++;
        bufl += stride;
      }
      while (*bufr > a) {
        j--;
        bufr -= stride;
      }
      if (j <= i)
        stop2 = 1;
      else {
        {
          tmp = (*bufl);
          (*bufl) = (*bufr);
          (*bufr) = tmp;
        }
        j--;
        bufr -= stride;
        i++;
        bufl += stride;
      }
      if ((same_extremities) && (j == jr)) {
        j--;
        bufr -= stride;
        {
          tmp = (x[il * stride]);
          (x[il * stride]) = (*bufr);
          (*bufr) = tmp;
        }
        stop2 = 1;
      }
    }
    if (j > p)
      jr = j;
    else if (j < p)
      il = i;
    else
      stop1 = 1;
  }
  return a;
}
```