user: Translate the below assembly code into C programming language:

```asm
<main>:
  endbr64
  push   %r13
  pxor   %xmm0,%xmm0
  lea    D3(%rip),%rdi
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  mov    %rsp,%r13
  movl   $0x0,0x10(%rsp)
  mov    %r13,%rsi
  movaps %xmm0,(%rsp)
  call   <scanf@plt>
  mov    $0x3,%edx
  lea    D115(%rip),%rsi
  mov    %r13,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L120
L91:
  xor    %r12d,%r12d
  xor    %ebx,%ebx
  xor    %ebp,%ebp
  jmp    L130
  cs nopw 0x0(%rax,%rax,1)
L145:
  movzbl 0x0(%r13,%r12,1),%eax
  sub    $0x30,%eax
  cmp    $0x9,%al
  ja     L106
  add    $0x1,%ebx
  movsbl %al,%eax
  imul   %ebx,%eax
  cltq
  add    %rax,%rbp
L106:
  add    $0x1,%r12
L130:
  mov    %r13,%rdi
  call   <strlen@plt>
  sub    $0x2,%eax
  cmp    %r12d,%eax
  jg     L145
  mov    %rbp,%rsi
  lea    D43(%rip),%rdi
  lea    0x4(%rsp),%rbp
  xor    %eax,%eax
  call   <printf@plt>
  mov    $0x6,%edx
  lea    D107(%rip),%rsi
  mov    %rbp,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L123
L27:
  mov    $0x5,%edx
  lea    D26(%rip),%rsi
  mov    %rbp,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L56
L92:
  mov    $0x4,%edx
  lea    D53(%rip),%rsi
  mov    %rbp,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L104
L141:
  lea    D126(%rip),%r12
  mov    $0x1,%edx
  mov    %rbp,%rdi
  mov    %r12,%rsi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L76
L57:
  mov    %r12,%rdi
  call   <puts@plt>
L127:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L119
  add    $0x28,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L120:
  mov    $0x3,%edx
  lea    D12(%rip),%rsi
  mov    %r13,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L91
  lea    D127(%rip),%rdi
  call   <puts@plt>
  jmp    L127
L76:
  lea    D71(%rip),%rdi
  call   <puts@plt>
  jmp    L57
L104:
  lea    D73(%rip),%rdi
  call   <puts@plt>
  jmp    L141
L56:
  lea    D109(%rip),%rdi
  call   <puts@plt>
  jmp    L92
L123:
  lea    D36(%rip),%rdi
  call   <puts@plt>
  jmp    L27
L119:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: tag: D3
type: string
name: unpack_data
arguments: tag: D115
type: string
name: unpack_data
arguments: tag: D43
type: string
name: unpack_data
arguments: tag: D107
type: string
name: unpack_data
arguments: tag: D26
type: string
name: unpack_data
arguments: tag: D53
type: string
name: unpack_data
arguments: tag: D126
type: string
name: unpack_data
arguments: tag: D12
type: string
name: unpack_data
arguments: tag: D127
type: string
name: unpack_data
arguments: tag: D71
type: string
name: unpack_data
arguments: tag: D73
type: string
name: unpack_data
arguments: tag: D109
type: string
name: unpack_data
arguments: tag: D36
type: string

tool: D3: %s

tool: D115: 978

tool: D43: %li


tool: D107: 933346

tool: D26: 55583

tool: D53: 4210

tool: D126: 1

tool: D12: 979

tool: D127: 0

tool: D71: Pyramid Books

tool: D73: FUNimation Productions, Ltd.

tool: D109: Alyson Books

tool: D36: Bluebridge

assistant: ```c
int main() {
  char a[20] = {0};
  scanf("%s", a);
  if (0 == strncmp(a, "978", 3) || 0 == strncmp(a, "979", 3)) {
    long chek = 0;
    for (int i = 0, k = 0; i < strlen(a) - 2; ++i) {
      if (a[i] <= '9' && '0' <= a[i]) {
        k++;
        if (a[i] != '-')
          chek = chek + (a[i] - '0') * k;
        else
          ;
      }
    }
    printf("%li\n", chek);
    char *b = a + 4;
    if (0 == strncmp(b, "933346", 6)) {
      printf("%s\n", "Bluebridge");
    }
    if (0 == strncmp(b, "55583", 5)) {
      printf("%s\n", "Alyson Books");
    }
    if (0 == strncmp(b, "4210", 4)) {
      printf("%s\n", "FUNimation Productions, Ltd.");
    }
    if (0 == strncmp(b, "1", 1)) {
      printf("%s\n", "Pyramid Books");
    }
    printf("1\n");
  } else {
    printf("0\n");
  }
  return 0;
}
```