user: 这段汇编代码用C语言表示是什么样的：

```asm
<ConvertBinaryToGray>:
  endbr64
  lea    0x0(,%rdx,8),%r10d
  mov    $0x1,%r8d
  mov    %r10d,%edx
  lea    0x6(%r10),%eax
  sub    $0x1,%edx
  cmovns %edx,%eax
  sar    $0x3,%eax
  cltq
  lea    (%rdi,%rax,1),%r9
  movzbl (%r9),%edi
  shr    $0x7,%dil
  sub    $0x2,%r10d
  js     L2
  nopw   0x0(%rax,%rax,1)
L67:
  mov    %r10d,%edx
  movzbl (%r9),%esi
  mov    %r8d,%eax
  and    $0x7,%edx
  mov    %edx,%ecx
  shl    %cl,%eax
  shl    %cl,%edi
  and    %eax,%esi
  not    %eax
  and    (%r9),%al
  xor    %esi,%edi
  movzbl %sil,%esi
  sar    %cl,%esi
  or     %edi,%eax
  lea    -0x1(%rdx),%ecx
  mov    %esi,%edi
  test   %edx,%edx
  je     L83
  mov    %r8d,%r11d
  mov    %eax,%edi
  shl    %cl,%esi
  shl    %cl,%r11d
  and    %r11d,%edi
  not    %r11d
  xor    %edi,%esi
  and    %eax,%r11d
  mov    %esi,%eax
  movzbl %dil,%esi
  sar    %cl,%esi
  or     %r11d,%eax
  lea    -0x2(%rdx),%ecx
  mov    %esi,%edi
  cmp    $0x1,%edx
  je     L83
  mov    %r8d,%r11d
  mov    %eax,%edi
  shl    %cl,%esi
  shl    %cl,%r11d
  and    %r11d,%edi
  not    %r11d
  xor    %edi,%esi
  and    %eax,%r11d
  mov    %esi,%eax
  movzbl %dil,%esi
  sar    %cl,%esi
  or     %r11d,%eax
  lea    -0x3(%rdx),%ecx
  mov    %esi,%edi
  cmp    $0x2,%edx
  je     L83
  mov    %r8d,%r11d
  mov    %eax,%edi
  shl    %cl,%esi
  shl    %cl,%r11d
  and    %r11d,%edi
  not    %r11d
  xor    %edi,%esi
  and    %eax,%r11d
  mov    %esi,%eax
  movzbl %dil,%esi
  sar    %cl,%esi
  or     %r11d,%eax
  lea    -0x4(%rdx),%ecx
  mov    %esi,%edi
  cmp    $0x3,%edx
  je     L83
  mov    %r8d,%r11d
  mov    %eax,%edi
  shl    %cl,%esi
  shl    %cl,%r11d
  and    %r11d,%edi
  not    %r11d
  and    %eax,%r11d
  xor    %edi,%esi
  mov    %r11d,%eax
  or     %esi,%eax
  movzbl %dil,%esi
  sar    %cl,%esi
  lea    -0x5(%rdx),%ecx
  mov    %esi,%edi
  cmp    $0x4,%edx
  je     L83
  mov    %r8d,%r11d
  mov    %eax,%edi
  shl    %cl,%esi
  shl    %cl,%r11d
  and    %r11d,%edi
  not    %r11d
  and    %eax,%r11d
  xor    %edi,%esi
  mov    %r11d,%eax
  or     %esi,%eax
  movzbl %dil,%esi
  sar    %cl,%esi
  lea    -0x6(%rdx),%ecx
  mov    %esi,%edi
  cmp    $0x5,%edx
  je     L83
  mov    %r8d,%edi
  mov    %eax,%edx
  shl    %cl,%esi
  shl    %cl,%edi
  and    %edi,%edx
  not    %edi
  and    %eax,%edi
  xor    %edx,%esi
  movzbl %dl,%edx
  mov    %edi,%eax
  sar    %cl,%edx
  or     %esi,%eax
  test   %ecx,%ecx
  je     L88
  mov    %eax,%edi
  and    $0xfffffffe,%eax
  and    $0x1,%edi
  xor    %edi,%edx
  or     %edx,%eax
L83:
  mov    %al,(%r9)
  mov    %r10d,%eax
  sub    $0x1,%r9
  and    $0xfffffff8,%eax
  lea    -0x1(%rax),%r10d
  test   %eax,%eax
  jne    L67
L2:
  ret
L88:
  mov    %edx,%edi
  jmp    L83
```

assistant: ```c
void ConvertBinaryToGray(const unsigned char *src, unsigned char *dest, int size_in_bytes) {
  int bitoffset;
  unsigned char *srcp, *destp;
  unsigned char savedbit;
  bitoffset = size_in_bytes * 8 - 1;
  srcp = (unsigned char *)src + bitoffset / 8;
  destp = (unsigned char *)src + bitoffset / 8;
  savedbit = *srcp & (1 << 7);
  *destp &= ~(1 << 7);
  *destp |= savedbit;
  savedbit >>= 7;
  bitoffset--;
  for (;;) {
    int i;
    if (bitoffset < 0)
      break;
    i = bitoffset & 7;
    while (i >= 0) {
      unsigned char bit;
      bit = *srcp & (1 << i);
      *destp &= ~(1 << i);
      *destp |= (savedbit << i) ^ bit;
      savedbit = bit >> i;
      i--;
    }
    bitoffset = (bitoffset & (~7)) - 1;
    srcp--;
    destp--;
  }
}
```