user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<byteswap>:
  endbr64
  movq   %xmm0,%rcx
  movq   %xmm0,%rax
  movq   %xmm0,%rdx
  movabs $0xff00ffffffffffff,%rsi
  shl    $0x38,%rcx
  shr    $0x38,%rax
  or     %rcx,%rax
  movq   %xmm0,%rcx
  shl    $0x8,%rcx
  sar    $0x38,%rcx
  mov    %cl,%ah
  movzbl %dh,%ecx
  sar    $0x18,%edx
  shl    $0x30,%rcx
  and    %rsi,%rax
  movzbl %dl,%edx
  movabs $0xffff00ffffffffff,%rsi
  or     %rcx,%rax
  movq   %xmm0,%rcx
  shl    $0x20,%rdx
  shr    $0x18,%rcx
  and    $0xffffffffff00ffff,%rax
  and    $0xff0000,%ecx
  or     %rcx,%rax
  movq   %xmm0,%rcx
  shr    $0x10,%rcx
  and    %rsi,%rax
  movabs $0xffffffff00ffffff,%rsi
  and    $0xff,%ecx
  shl    $0x28,%rcx
  or     %rcx,%rax
  movq   %xmm0,%rcx
  shr    $0x8,%rcx
  and    %rsi,%rax
  and    $0xff000000,%ecx
  or     %rcx,%rax
  movabs $0xffffff00ffffffff,%rcx
  and    %rcx,%rax
  or     %rdx,%rax
  movq   %rax,%xmm0
  ret
```

assistant: ```c
double byteswap(double x) {
  char buf[sizeof(double)];
  char t;
  memcpy(buf, &x, sizeof(double));
  if (sizeof(double) > 2 * (0) + 1)
    t = buf[0], buf[0] = buf[sizeof(double) - 1 - (0)], buf[sizeof(double) - 1 - (0)] = t;
  if (sizeof(double) > 2 * ((0) + 1) + 1)
    t = buf[(0) + 1], buf[(0) + 1] = buf[sizeof(double) - 1 - ((0) + 1)], buf[sizeof(double) - 1 - ((0) + 1)] = t;
  if (sizeof(double) > 2 * ((0) + 2) + 1)
    t = buf[(0) + 2], buf[(0) + 2] = buf[sizeof(double) - 1 - ((0) + 2)], buf[sizeof(double) - 1 - ((0) + 2)] = t;
  if (sizeof(double) > 2 * (((0) + 2) + 1) + 1)
    t = buf[((0) + 2) + 1], buf[((0) + 2) + 1] = buf[sizeof(double) - 1 - (((0) + 2) + 1)], buf[sizeof(double) - 1 - (((0) + 2) + 1)] = t;
  if (sizeof(double) > 2 * ((0) + 4) + 1)
    t = buf[(0) + 4], buf[(0) + 4] = buf[sizeof(double) - 1 - ((0) + 4)], buf[sizeof(double) - 1 - ((0) + 4)] = t;
  if (sizeof(double) > 2 * (((0) + 4) + 1) + 1)
    t = buf[((0) + 4) + 1], buf[((0) + 4) + 1] = buf[sizeof(double) - 1 - (((0) + 4) + 1)], buf[sizeof(double) - 1 - (((0) + 4) + 1)] = t;
  if (sizeof(double) > 2 * (((0) + 4) + 2) + 1)
    t = buf[((0) + 4) + 2], buf[((0) + 4) + 2] = buf[sizeof(double) - 1 - (((0) + 4) + 2)], buf[sizeof(double) - 1 - (((0) + 4) + 2)] = t;
  if (sizeof(double) > 2 * ((((0) + 4) + 2) + 1) + 1)
    t = buf[(((0) + 4) + 2) + 1], buf[(((0) + 4) + 2) + 1] = buf[sizeof(double) - 1 - ((((0) + 4) + 2) + 1)], buf[sizeof(double) - 1 - ((((0) + 4) + 2) + 1)] = t;
  if (sizeof(double) > 2 * ((0) + 8) + 1)
    t = buf[(0) + 8], buf[(0) + 8] = buf[sizeof(double) - 1 - ((0) + 8)], buf[sizeof(double) - 1 - ((0) + 8)] = t;
  if (sizeof(double) > 2 * (((0) + 8) + 1) + 1)
    t = buf[((0) + 8) + 1], buf[((0) + 8) + 1] = buf[sizeof(double) - 1 - (((0) + 8) + 1)], buf[sizeof(double) - 1 - (((0) + 8) + 1)] = t;
  if (sizeof(double) > 2 * (((0) + 8) + 2) + 1)
    t = buf[((0) + 8) + 2], buf[((0) + 8) + 2] = buf[sizeof(double) - 1 - (((0) + 8) + 2)], buf[sizeof(double) - 1 - (((0) + 8) + 2)] = t;
  if (sizeof(double) > 2 * ((((0) + 8) + 2) + 1) + 1)
    t = buf[(((0) + 8) + 2) + 1], buf[(((0) + 8) + 2) + 1] = buf[sizeof(double) - 1 - ((((0) + 8) + 2) + 1)], buf[sizeof(double) - 1 - ((((0) + 8) + 2) + 1)] = t;
  if (sizeof(double) > 2 * (((0) + 8) + 4) + 1)
    t = buf[((0) + 8) + 4], buf[((0) + 8) + 4] = buf[sizeof(double) - 1 - (((0) + 8) + 4)], buf[sizeof(double) - 1 - (((0) + 8) + 4)] = t;
  if (sizeof(double) > 2 * ((((0) + 8) + 4) + 1) + 1)
    t = buf[(((0) + 8) + 4) + 1], buf[(((0) + 8) + 4) + 1] = buf[sizeof(double) - 1 - ((((0) + 8) + 4) + 1)], buf[sizeof(double) - 1 - ((((0) + 8) + 4) + 1)] = t;
  if (sizeof(double) > 2 * ((((0) + 8) + 4) + 2) + 1)
    t = buf[(((0) + 8) + 4) + 2], buf[(((0) + 8) + 4) + 2] = buf[sizeof(double) - 1 - ((((0) + 8) + 4) + 2)], buf[sizeof(double) - 1 - ((((0) + 8) + 4) + 2)] = t;
  if (sizeof(double) > 2 * (((((0) + 8) + 4) + 2) + 1) + 1)
    t = buf[((((0) + 8) + 4) + 2) + 1], buf[((((0) + 8) + 4) + 2) + 1] = buf[sizeof(double) - 1 - (((((0) + 8) + 4) + 2) + 1)], buf[sizeof(double) - 1 - (((((0) + 8) + 4) + 2) + 1)] = t;
  memcpy(&x, buf, sizeof(double));
  return x;
}
```