user: Please show me the C implementation that matches the assembly code listed below:

```asm
<main>:
  endbr64
  push   %rbp
  pxor   %xmm0,%xmm0
  lea    D55(%rip),%rdi
  push   %rbx
  xor    %ebx,%ebx
  sub    $0x58,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x48(%rsp)
  xor    %eax,%eax
  lea    0x30(%rsp),%rbp
  movl   $0x0,0x40(%rsp)
  mov    %rbp,%rsi
  movaps %xmm0,0x30(%rsp)
  call   <scanf@plt>
  cmpb   $0x39,0x30(%rsp)
  je     L77
L367:
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  test   %eax,%eax
  jle    L285
  lea    -0x1(%rax),%esi
  cmp    $0xe,%esi
  jbe    L370
  movdqa D11(%rip),%xmm1
  paddb  0x30(%rsp),%xmm1
  pxor   %xmm2,%xmm2
  mov    %edx,%ecx
  psubusb D12(%rip),%xmm1
  and    $0xfffffff0,%ecx
  pcmpeqb %xmm2,%xmm1
  pand   D98(%rip),%xmm1
  pcmpgtb %xmm1,%xmm2
  movdqa %xmm1,%xmm0
  punpcklbw %xmm2,%xmm0
  punpckhbw %xmm2,%xmm1
  pxor   %xmm2,%xmm2
  movdqa %xmm2,%xmm3
  pcmpgtw %xmm1,%xmm2
  movdqa %xmm0,%xmm4
  pcmpgtw %xmm0,%xmm3
  punpcklwd %xmm3,%xmm4
  punpckhwd %xmm3,%xmm0
  movdqa %xmm1,%xmm3
  paddd  %xmm4,%xmm0
  punpcklwd %xmm2,%xmm3
  punpckhwd %xmm2,%xmm1
  paddd  %xmm3,%xmm0
  paddd  %xmm1,%xmm0
  movdqa %xmm0,%xmm1
  psrldq $0x8,%xmm1
  paddd  %xmm1,%xmm0
  movdqa %xmm0,%xmm1
  psrldq $0x4,%xmm1
  paddd  %xmm1,%xmm0
  movd   %xmm0,%eax
  test   $0xf,%dl
  je     L421
L441:
  movslq %ecx,%rdi
  movzbl 0x30(%rsp,%rdi,1),%edi
  sub    $0x30,%edi
  cmp    $0xa,%dil
  lea    0x1(%rcx),%edi
  adc    $0x0,%eax
  cmp    %edi,%edx
  jle    L421
  movslq %edi,%rdi
  movzbl 0x30(%rsp,%rdi,1),%edi
  sub    $0x30,%edi
  cmp    $0xa,%dil
  lea    0x2(%rcx),%edi
  adc    $0x0,%eax
  cmp    %edi,%edx
  jle    L421
  movslq %edi,%rdi
  movzbl 0x30(%rsp,%rdi,1),%edi
  sub    $0x30,%edi
  cmp    $0xa,%dil
  lea    0x3(%rcx),%edi
  adc    $0x0,%eax
  cmp    %edi,%edx
  jle    L421
  movslq %edi,%rdi
  movzbl 0x30(%rsp,%rdi,1),%edi
  sub    $0x30,%edi
  cmp    $0xa,%dil
  lea    0x4(%rcx),%edi
  adc    $0x0,%eax
  cmp    %edi,%edx
  jle    L421
  movslq %edi,%rdi
  movzbl 0x30(%rsp,%rdi,1),%edi
  sub    $0x30,%edi
  cmp    $0xa,%dil
  lea    0x5(%rcx),%edi
  adc    $0x0,%eax
  cmp    %edi,%edx
  jle    L421
  movslq %edi,%rdi
  movzbl 0x30(%rsp,%rdi,1),%edi
  sub    $0x30,%edi
  cmp    $0xa,%dil
  lea    0x6(%rcx),%edi
  adc    $0x0,%eax
  cmp    %edi,%edx
  jle    L421
  movslq %edi,%rdi
  movzbl 0x30(%rsp,%rdi,1),%edi
  sub    $0x30,%edi
  cmp    $0xa,%dil
  lea    0x7(%rcx),%edi
  adc    $0x0,%eax
  cmp    %edi,%edx
  jle    L421
  movslq %edi,%rdi
  movzbl 0x30(%rsp,%rdi,1),%edi
  sub    $0x30,%edi
  cmp    $0xa,%dil
  lea    0x8(%rcx),%edi
  adc    $0x0,%eax
  cmp    %edi,%edx
  jle    L421
  movslq %edi,%rdi
  movzbl 0x30(%rsp,%rdi,1),%edi
  sub    $0x30,%edi
  cmp    $0xa,%dil
  lea    0x9(%rcx),%edi
  adc    $0x0,%eax
  cmp    %edi,%edx
  jle    L421
  movslq %edi,%rdi
  movzbl 0x30(%rsp,%rdi,1),%edi
  sub    $0x30,%edi
  cmp    $0xa,%dil
  lea    0xa(%rcx),%edi
  adc    $0x0,%eax
  cmp    %edi,%edx
  jle    L421
  movslq %edi,%rdi
  movzbl 0x30(%rsp,%rdi,1),%edi
  sub    $0x30,%edi
  cmp    $0xa,%dil
  lea    0xb(%rcx),%edi
  adc    $0x0,%eax
  cmp    %edi,%edx
  jle    L421
  movslq %edi,%rdi
  movzbl 0x30(%rsp,%rdi,1),%edi
  sub    $0x30,%edi
  cmp    $0xa,%dil
  lea    0xc(%rcx),%edi
  adc    $0x0,%eax
  cmp    %edi,%edx
  jle    L421
  movslq %edi,%rdi
  movzbl 0x30(%rsp,%rdi,1),%edi
  sub    $0x30,%edi
  cmp    $0xa,%dil
  lea    0xd(%rcx),%edi
  adc    $0x0,%eax
  cmp    %edi,%edx
  jle    L421
  movslq %edi,%rdi
  movzbl 0x30(%rsp,%rdi,1),%edi
  sub    $0x30,%edi
  cmp    $0xa,%dil
  adc    $0x0,%eax
  add    $0xe,%ecx
  cmp    %ecx,%edx
  jle    L421
  movslq %ecx,%rcx
  movzbl 0x30(%rsp,%rcx,1),%edx
  sub    $0x30,%edx
  cmp    $0xa,%dl
  adc    $0x0,%eax
  nopl   0x0(%rax,%rax,1)
L421:
  xor    %ecx,%ecx
  cmp    $0xd,%eax
  lea    0x31(%rsp,%rsi,1),%r8
  mov    %rbp,%rdx
  sete   %cl
  xor    %esi,%esi
  nopw   0x0(%rax,%rax,1)
L46:
  movsbl (%rdx),%eax
  cmp    $0x2d,%al
  je     L288
  movslq %esi,%rdi
  sub    $0x30,%eax
  add    $0x1,%esi
  mov    %eax,(%rsp,%rdi,4)
L288:
  add    $0x1,%rdx
  cmp    %rdx,%r8
  jne    L46
L165:
  movdqa (%rsp),%xmm0
  shufps $0x88,0x10(%rsp),%xmm0
  movdqa %xmm0,%xmm1
  movdqu 0x14(%rsp),%xmm5
  psrldq $0x8,%xmm1
  paddd  %xmm1,%xmm0
  movdqa %xmm0,%xmm1
  psrldq $0x4,%xmm1
  paddd  %xmm1,%xmm0
  movd   %xmm0,%eax
  movdqu 0x4(%rsp),%xmm0
  add    0x20(%rsp),%eax
  mov    %eax,%edx
  shufps $0x88,%xmm5,%xmm0
  movdqa %xmm0,%xmm1
  psrldq $0x8,%xmm1
  paddd  %xmm1,%xmm0
  movdqa %xmm0,%xmm1
  psrldq $0x4,%xmm1
  paddd  %xmm1,%xmm0
  movd   %xmm0,%eax
  add    0x24(%rsp),%eax
  add    0x2c(%rsp),%eax
  lea    (%rax,%rax,2),%esi
  mov    0x28(%rsp),%eax
  add    %edx,%eax
  lea    (%rsi,%rax,1),%edx
  movslq %edx,%rax
  mov    %edx,%esi
  imul   $0x66666667,%rax,%rax
  sar    $0x1f,%esi
  sar    $0x22,%rax
  sub    %esi,%eax
  lea    (%rax,%rax,4),%eax
  add    %eax,%eax
  sub    %edx,%eax
  add    $0xa,%eax
  cmp    %eax,0x30(%rsp)
  je     L445
L15:
  lea    D66(%rip),%rdi
  call   <printf@plt>
L414:
  mov    0x48(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L387
  add    $0x58,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  ret
L77:
  cmpb   $0x37,0x31(%rsp)
  jne    L367
  movzbl 0x32(%rsp),%eax
  xor    %ebx,%ebx
  sub    $0x38,%eax
  cmp    $0x1,%al
  setbe  %bl
  jmp    L367
L445:
  test   %ecx,%ebx
  je     L15
  lea    D25(%rip),%rdi
  call   <printf@plt>
  cmpb   $0x39,0x36(%rsp)
  je     L215
L311:
  cmpb   $0x35,0x36(%rsp)
  jne    L392
  cmpb   $0x35,0x37(%rsp)
  jne    L414
  cmpb   $0x35,0x38(%rsp)
  jne    L414
  cmpb   $0x38,0x39(%rsp)
  jne    L414
  cmpb   $0x33,0x3a(%rsp)
  jne    L414
  lea    D37(%rip),%rdi
  call   <printf@plt>
L392:
  cmpb   $0x34,0x36(%rsp)
  jne    L20
  cmpb   $0x32,0x37(%rsp)
  jne    L414
  cmpb   $0x31,0x38(%rsp)
  jne    L414
  cmpb   $0x30,0x39(%rsp)
  jne    L414
  lea    D93(%rip),%rdi
  call   <printf@plt>
L20:
  cmpb   $0x30,0x36(%rsp)
  jne    L414
  cmpb   $0x31,0x37(%rsp)
  jne    L414
  lea    D43(%rip),%rdi
  call   <printf@plt>
  jmp    L414
L285:
  xor    %ecx,%ecx
  jmp    L165
L370:
  xor    %ecx,%ecx
  xor    %eax,%eax
  jmp    L441
L215:
  cmpb   $0x33,0x37(%rsp)
  jne    L20
  cmpb   $0x33,0x38(%rsp)
  jne    L20
  cmpb   $0x33,0x39(%rsp)
  jne    L20
  cmpb   $0x34,0x3a(%rsp)
  jne    L20
  cmpb   $0x36,0x3b(%rsp)
  jne    L20
  lea    D88(%rip),%rdi
  call   <printf@plt>
  jmp    L311
L387:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: tag: D55
datatype: string
name: unpack_data
arguments: tag: D11
datatype: byte[16]
name: unpack_data
arguments: tag: D12
datatype: byte[16]
name: unpack_data
arguments: tag: D98
datatype: byte[16]
name: unpack_data
arguments: tag: D66
datatype: string
name: unpack_data
arguments: tag: D25
datatype: string
name: unpack_data
arguments: tag: D37
datatype: string
name: unpack_data
arguments: tag: D93
datatype: string
name: unpack_data
arguments: tag: D43
datatype: string
name: unpack_data
arguments: tag: D88
datatype: string

tool: D55: %s

tool: {"D11": [0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0]}

tool: {"D12": [0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09]}

tool: {"D98": [0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01]}

tool: D66: 0


tool: D25: 1


tool: D37: Alyson Books


tool: D93: FUNimation Productions, Ltd.


tool: D43: Pyramid Books


tool: D88: Bluebridge


assistant: ```c
int main() {
  char isbn13[20] = {0};
  int arr[12];
  int count = 0;
  int counter = 0;
  int lenght = 0;
  int sum1 = 0;
  int sum2 = 0;
  int sum3 = 0;
  int suma = 0;
  int supp = 0;
  int help = 0;
  int helper = 0;
  int helpp = 0;
  scanf("%s", isbn13);
  if ((isbn13[0] == '9' && isbn13[1] == '7' && isbn13[2] == '8') || (isbn13[0] == '9' && isbn13[1] == '7' && isbn13[2] == '9')) {
    help = 1;
  } else {
    help = 0;
  }
  lenght = strlen(isbn13);
  for (counter = 0; counter < lenght; counter++) {
    if (isbn13[counter] >= 48 && isbn13[counter] <= 57) {
      count++;
    }
  }
  if (count == 13) {
    helper = 1;
  } else {
    helper = 0;
  }
  count = 0;
  for (counter = 0; counter < lenght; counter++) {
    if (isbn13[counter] != '-') {
      arr[count] = (isbn13[counter] - 48);
      count++;
    }
  }
  for (counter = 0; counter <= 10; counter = counter + 2) {
    sum1 = sum1 + arr[counter];
  }
  for (counter = 1; counter <= 11; counter = counter + 2) {
    sum2 = sum2 + arr[counter];
  }
  sum3 = sum2 * 3;
  suma = sum1 + sum3;
  supp = suma % 10;
  if (arr[12] == 10 - supp) {
    helpp = 1;
  } else {
    helpp = 0;
  }
  if (help == 1 && helper == 1 && helpp == 1) {
    printf("1\n");
    if (isbn13[6] == '9' && isbn13[7] == '3' && isbn13[8] == '3' && isbn13[9] == '3' && isbn13[10] == '4' && isbn13[11] == '6')
      printf("Bluebridge\n");
    if (isbn13[6] == '5' && isbn13[7] == '5' && isbn13[8] == '5' && isbn13[9] == '8' && isbn13[10] == '3')
      printf("Alyson Books\n");
    if (isbn13[6] == '4' && isbn13[7] == '2' && isbn13[8] == '1' && isbn13[9] == '0')
      printf("FUNimation Productions, Ltd.\n");
    if (isbn13[6] == '0' && isbn13[7] == '1')
      printf("Pyramid Books\n");
  } else {
    printf("0\n");
  }
  return 0;
}
```