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

```asm
<USPS_MSB_Math_CRC11GenerateFrameCheckSequence>:
  endbr64
  mov    %rdi,%rsi
  movzbl (%rdi),%edi
  lea    0x1(%rsi),%rcx
  mov    %edi,%eax
  mov    %edi,%edx
  shl    $0x5,%eax
  xor    $0x7ff,%ax
  and    $0x400,%ax
  cmp    $0x1,%ax
  sbb    %eax,%eax
  shl    $0x6,%edx
  and    $0xf33,%ax
  add    $0xcb,%ax
  and    $0x7ff,%ax
  xor    %eax,%edx
  add    %eax,%eax
  and    $0x4,%dh
  je     L35
  xor    $0xf35,%ax
L35:
  mov    %edi,%edx
  and    $0x7ff,%ax
  shl    $0x7,%edx
  xor    %eax,%edx
  add    %eax,%eax
  and    $0x4,%dh
  je     L4
  xor    $0xf35,%ax
L4:
  mov    %edi,%edx
  and    $0x7ff,%ax
  shl    $0x8,%edx
  xor    %eax,%edx
  add    %eax,%eax
  and    $0x4,%dh
  je     L101
  xor    $0xf35,%ax
L101:
  mov    %edi,%edx
  and    $0x7ff,%ax
  shl    $0x9,%edx
  xor    %eax,%edx
  and    $0x4,%dh
  lea    (%rax,%rax,1),%edx
  je     L45
  xor    $0xf35,%dx
L45:
  and    $0x7ff,%dx
  shl    $0xa,%edi
  xor    %edx,%edi
  lea    (%rdx,%rdx,1),%eax
  test   $0x400,%di
  je     L26
  xor    $0xf35,%ax
L26:
  and    $0x7ff,%ax
  add    $0xd,%rsi
  nopl   0x0(%rax,%rax,1)
L64:
  movzbl (%rcx),%edx
  add    $0x1,%rcx
  lea    0x0(,%rdx,8),%edi
  xor    %eax,%edi
  add    %eax,%eax
  test   $0x400,%di
  je     L97
  xor    $0xf35,%ax
L97:
  mov    %edx,%edi
  and    $0x7ff,%ax
  shl    $0x4,%edi
  xor    %eax,%edi
  add    %eax,%eax
  test   $0x400,%di
  je     L13
  xor    $0xf35,%ax
L13:
  mov    %edx,%edi
  and    $0x7ff,%ax
  shl    $0x5,%edi
  xor    %eax,%edi
  add    %eax,%eax
  test   $0x400,%di
  je     L74
  xor    $0xf35,%ax
L74:
  mov    %edx,%edi
  and    $0x7ff,%ax
  shl    $0x6,%edi
  xor    %eax,%edi
  add    %eax,%eax
  test   $0x400,%di
  je     L11
  xor    $0xf35,%ax
L11:
  mov    %edx,%edi
  and    $0x7ff,%ax
  shl    $0x7,%edi
  xor    %eax,%edi
  add    %eax,%eax
  test   $0x400,%di
  je     L14
  xor    $0xf35,%ax
L14:
  mov    %edx,%edi
  and    $0x7ff,%ax
  shl    $0x8,%edi
  xor    %eax,%edi
  add    %eax,%eax
  test   $0x400,%di
  je     L132
  xor    $0xf35,%ax
L132:
  mov    %edx,%edi
  and    $0x7ff,%ax
  shl    $0x9,%edi
  xor    %eax,%edi
  add    %eax,%eax
  test   $0x400,%di
  je     L111
  xor    $0xf35,%ax
L111:
  and    $0x7ff,%ax
  shl    $0xa,%edx
  xor    %eax,%edx
  add    %eax,%eax
  and    $0x4,%dh
  jne    L59
  and    $0x7ff,%ax
  cmp    %rcx,%rsi
  jne    L64
  ret
  nopl   0x0(%rax,%rax,1)
L59:
  xor    $0xf35,%ax
  and    $0x7ff,%ax
  cmp    %rcx,%rsi
  jne    L64
  ret
```

assistant: ```c
unsigned short USPS_MSB_Math_CRC11GenerateFrameCheckSequence(unsigned char *ByteArrayPtr) {
  unsigned short GeneratorPolynomial = 0x0F35;
  unsigned short FrameCheckSequence = 0x07FF;
  unsigned short Data;
  int ByteIndex, Bit;
  Data = *ByteArrayPtr << 5;
  ByteArrayPtr++;
  for (Bit = 2; Bit < 8; Bit++) {
    if ((FrameCheckSequence ^ Data) & 0x400)
      FrameCheckSequence = (FrameCheckSequence << 1) ^ GeneratorPolynomial;
    else
      FrameCheckSequence = (FrameCheckSequence << 1);
    FrameCheckSequence &= 0x7FF;
    Data <<= 1;
  }
  for (ByteIndex = 1; ByteIndex < 13; ByteIndex++) {
    Data = *ByteArrayPtr << 3;
    ByteArrayPtr++;
    for (Bit = 0; Bit < 8; Bit++) {
      if ((FrameCheckSequence ^ Data) & 0x0400) {
        FrameCheckSequence = (FrameCheckSequence << 1) ^ GeneratorPolynomial;
      } else {
        FrameCheckSequence = (FrameCheckSequence << 1);
      }
      FrameCheckSequence &= 0x7FF;
      Data <<= 1;
    }
  }
  return FrameCheckSequence;
}
```