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

```asm
<xdr_double>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x38(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x82,%eax
  je     L137
  cmp    $0x82,%eax
  jg     L168
  cmp    $0x80,%eax
  je     L175
  cmp    $0x81,%eax
  jne    L168
  mov    -0x40(%rbp),%rax
  mov    %rax,-0x28(%rbp)
  mov    D17(%rip),%rax
  mov    (%rax),%edx
  mov    D88(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  je     L50
  mov    $0x4,%edx
  jmp    L190
L50:
  mov    $0x0,%edx
L190:
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  mov    %rax,-0x20(%rbp)
  mov    D17(%rip),%rax
  mov    (%rax),%edx
  mov    D88(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jne    L120
  mov    $0x4,%edx
  jmp    L202
L120:
  mov    $0x0,%edx
L202:
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  mov    %rax,-0x18(%rbp)
  lea    -0x20(%rbp),%rdx
  mov    -0x38(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <XDR_PUTLONG@plt>
  test   %eax,%eax
  je     L27
  lea    -0x20(%rbp),%rax
  add    $0x8,%rax
  mov    -0x38(%rbp),%rdx
  mov    %rax,%rsi
  mov    %rdx,%rdi
  call   <XDR_PUTLONG@plt>
  test   %eax,%eax
  je     L27
  mov    $0x1,%eax
  jmp    L208
L27:
  mov    $0x0,%eax
  jmp    L208
L137:
  mov    -0x40(%rbp),%rax
  mov    %rax,-0x30(%rbp)
  mov    D17(%rip),%rax
  mov    (%rax),%edx
  mov    D88(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  je     L63
  mov    $0x8,%edx
  jmp    L106
L63:
  mov    $0x0,%edx
L106:
  lea    -0x20(%rbp),%rax
  add    %rax,%rdx
  mov    -0x38(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <XDR_GETLONG@plt>
  test   %eax,%eax
  je     L64
  mov    D17(%rip),%rax
  mov    (%rax),%edx
  mov    D88(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jne    L143
  mov    $0x8,%edx
  jmp    L70
L143:
  mov    $0x0,%edx
L70:
  lea    -0x20(%rbp),%rax
  add    %rax,%rdx
  mov    -0x38(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <XDR_GETLONG@plt>
  test   %eax,%eax
  je     L64
  mov    -0x20(%rbp),%rax
  mov    %eax,%edx
  mov    -0x30(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x18(%rbp),%rdx
  mov    -0x30(%rbp),%rax
  add    $0x4,%rax
  mov    %edx,(%rax)
  mov    D109(%rip),%rax
  mov    (%rax),%eax
  jmp    L208
L175:
  mov    D109(%rip),%rax
  mov    (%rax),%eax
  jmp    L208
L64:
  nop
L168:
  mov    D46(%rip),%rax
  mov    (%rax),%eax
L208:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L166
  call   <__stack_chk_fail@plt>
L166:
  leave
  ret
```

assistant: ```c
bool_t xdr_double(XDR *xdrs, double *dp) {
  switch (xdrs->x_op) {
  case XDR_ENCODE:
    if (2 * sizeof(long) == sizeof(double)) {
      long *lp = (long *)dp;
      return (XDR_PUTLONG(xdrs, lp + !(__FLOAT_WORD_ORDER == __BIG_ENDIAN)) && XDR_PUTLONG(xdrs, lp + (__FLOAT_WORD_ORDER == __BIG_ENDIAN)));
    } else if (2 * sizeof(int) == sizeof(double)) {
      int *ip = (int *)dp;
      long tmp[2];
      tmp[0] = ip[!(__FLOAT_WORD_ORDER == __BIG_ENDIAN)];
      tmp[1] = ip[(__FLOAT_WORD_ORDER == __BIG_ENDIAN)];
      return (XDR_PUTLONG(xdrs, tmp) && XDR_PUTLONG(xdrs, tmp + 1));
    }
    break;
  case XDR_DECODE:
    if (2 * sizeof(long) == sizeof(double)) {
      long *lp = (long *)dp;
      return (XDR_GETLONG(xdrs, lp + !(__FLOAT_WORD_ORDER == __BIG_ENDIAN)) && XDR_GETLONG(xdrs, lp + (__FLOAT_WORD_ORDER == __BIG_ENDIAN)));
    } else if (2 * sizeof(int) == sizeof(double)) {
      int *ip = (int *)dp;
      long tmp[2];
      if (XDR_GETLONG(xdrs, tmp + !(__FLOAT_WORD_ORDER == __BIG_ENDIAN)) && XDR_GETLONG(xdrs, tmp + (__FLOAT_WORD_ORDER == __BIG_ENDIAN))) {
        ip[0] = tmp[0];
        ip[1] = tmp[1];
        return (TRUE);
      }
    }
    break;
  case XDR_FREE:
    return (TRUE);
  }
  return (FALSE);
}
```