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

```asm
<upc_e_to_a>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  mov    $0x20,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  mov    %rax,D75(%rip)
  mov    D75(%rip),%rax
  test   %rax,%rax
  je     L21
  mov    D75(%rip),%rax
  sub    -0x18(%rbp),%rax
  mov    %eax,-0x8(%rbp)
  jmp    L116
L21:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x8(%rbp)
L116:
  cmpl   $0x8,-0x8(%rbp)
  je     L9
  cmpl   $0x8,-0x8(%rbp)
  jg     L117
  cmpl   $0x6,-0x8(%rbp)
  je     L30
  cmpl   $0x7,-0x8(%rbp)
  je     L45
  jmp    L117
L30:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <upc_e_to_a0@plt>
  mov    %eax,%esi
  lea    D43(%rip),%rax
  mov    %rax,%rdi
  call   <strcpy@plt>
  lea    D43(%rip),%rax
  jmp    L171
L45:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x30,%al
  je     L99
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x31,%al
  jne    L153
L99:
  mov    -0x18(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,%rdi
  call   <upc_e_to_a0@plt>
  mov    %eax,%esi
  lea    D43(%rip),%rax
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,D106(%rip)
  lea    D106(%rip),%rax
  jmp    L171
L153:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <upc_e_to_a0@plt>
  mov    %eax,%esi
  lea    D106(%rip),%rax
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    $0x0,%esi
  lea    D106(%rip),%rax
  mov    %rax,%rdi
  call   <ean_make_checksum@plt>
  mov    %eax,-0x4(%rbp)
  mov    -0x8(%rbp),%eax
  cltq
  lea    -0x1(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  sub    $0x30,%eax
  cmp    %eax,-0x4(%rbp)
  jne    L163
  lea    D106(%rip),%rax
  jmp    L171
L163:
  mov    $0x0,%eax
  jmp    L171
L9:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x30,%al
  je     L29
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x31,%al
  jne    L117
L29:
  mov    -0x18(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,%rdi
  call   <upc_e_to_a0@plt>
  mov    %eax,%esi
  lea    D106(%rip),%rax
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,D106(%rip)
  mov    $0x0,%esi
  lea    D106(%rip),%rax
  mov    %rax,%rdi
  call   <ean_make_checksum@plt>
  mov    %eax,-0x4(%rbp)
  mov    -0x8(%rbp),%eax
  cltq
  lea    -0x1(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  sub    $0x30,%eax
  cmp    %eax,-0x4(%rbp)
  jne    L117
  lea    D106(%rip),%rax
  jmp    L171
L117:
  mov    $0x0,%eax
L171:
  leave
  ret
```

assistant: ```c
char *upc_e_to_a(unsigned char *text) {
  static unsigned char result[16], *spc;
  int len, chk;
  spc = strchr(text, ' ');
  if (spc)
    len = spc - text;
  else
    len = strlen(text);
  switch (len) {
  case 6:
    strcpy(result, upc_e_to_a0(text));
    return result;
  case 7:
    if (text[0] == '0' || text[0] == '1') {
      strcpy(result, upc_e_to_a0(text + 1));
      result[0] = text[0];
      return result;
    }
    strcpy(result, upc_e_to_a0(text));
    chk = ean_make_checksum(result, 0);
    if (chk == (text[len - 1] - '0'))
      return result;
    return NULL;
  case 8:
    if (text[0] == '0' || text[0] == '1') {
      strcpy(result, upc_e_to_a0(text + 1));
      result[0] = text[0];
      chk = ean_make_checksum(result, 0);
      if (chk == (text[len - 1] - '0'))
        return result;
    }
  default:
    return NULL;
  }
}
```