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

```asm
<main>:
  endbr64
  push   %rbx
  sub    $0x50,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x48(%rsp)
  xor    %eax,%eax
  movq   $0x0,0x30(%rsp)
  movq   $0x0,0x38(%rsp)
  movl   $0x0,0x40(%rsp)
  lea    0x30(%rsp),%rsi
  lea    D29(%rip),%rdi
  call   <scanf@plt>
  mov    $0x0,%ebx
  cmpb   $0x39,0x30(%rsp)
  je     L288
L9:
  lea    0x30(%rsp),%rdi
  call   <strlen@plt>
  test   %eax,%eax
  jle    L240
  lea    0x30(%rsp),%rdx
  lea    -0x1(%rax),%eax
  lea    0x31(%rsp,%rax,1),%rdi
  mov    %rdx,%rax
  mov    $0x0,%esi
L23:
  movzbl (%rax),%ecx
  sub    $0x30,%ecx
  cmp    $0xa,%cl
  adc    $0x0,%esi
  add    $0x1,%rax
  cmp    %rdi,%rax
  jne    L23
  cmp    $0xd,%esi
  sete   %r8b
  movzbl %r8b,%r8d
  mov    $0x0,%ecx
  jmp    L173
L288:
  cmpb   $0x37,0x31(%rsp)
  jne    L9
  movzbl 0x32(%rsp),%eax
  sub    $0x38,%eax
  cmp    $0x1,%al
  setbe  %bl
  movzbl %bl,%ebx
  jmp    L9
L100:
  add    $0x1,%rdx
  cmp    %rdi,%rdx
  je     L317
L173:
  movzbl (%rdx),%eax
  cmp    $0x2d,%al
  je     L100
  movslq %ecx,%rsi
  movsbl %al,%eax
  sub    $0x30,%eax
  mov    %eax,(%rsp,%rsi,4)
  add    $0x1,%ecx
  jmp    L100
L240:
  mov    $0x0,%r8d
L317:
  mov    %rsp,%rax
  lea    0x30(%rsp),%rsi
  mov    %rax,%rdx
  mov    $0x0,%ecx
L62:
  add    (%rdx),%ecx
  add    $0x8,%rdx
  cmp    %rdx,%rsi
  jne    L62
  mov    $0x0,%edx
L115:
  add    0x4(%rax),%edx
  add    $0x8,%rax
  cmp    %rsi,%rax
  jne    L115
  lea    (%rdx,%rdx,2),%edx
  add    %ecx,%edx
  movslq %edx,%rax
  imul   $0x66666667,%rax,%rax
  sar    $0x22,%rax
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  lea    (%rax,%rax,4),%eax
  add    %eax,%eax
  sub    %edx,%eax
  lea    0xa(%rax),%eax
  cmp    0x30(%rsp),%eax
  jne    L201
  test   %bl,%r8b
  jne    L61
L201:
  lea    D13(%rip),%rdi
  call   <printf@plt>
L198:
  mov    0x48(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L72
  mov    $0x0,%eax
  add    $0x50,%rsp
  pop    %rbx
  ret
L61:
  lea    D26(%rip),%rdi
  call   <printf@plt>
  cmpb   $0x39,0x36(%rsp)
  je     L320
L22:
  cmpb   $0x35,0x36(%rsp)
  jne    L318
  cmpb   $0x35,0x37(%rsp)
  jne    L198
  cmpb   $0x35,0x38(%rsp)
  jne    L198
  cmpb   $0x38,0x39(%rsp)
  jne    L198
  cmpb   $0x33,0x3a(%rsp)
  jne    L198
  lea    D57(%rip),%rdi
  call   <printf@plt>
L318:
  cmpb   $0x34,0x36(%rsp)
  jne    L315
  cmpb   $0x32,0x37(%rsp)
  jne    L198
  cmpb   $0x31,0x38(%rsp)
  jne    L198
  cmpb   $0x30,0x39(%rsp)
  jne    L198
  lea    D3(%rip),%rdi
  call   <printf@plt>
  jmp    L315
L320:
  cmpb   $0x33,0x37(%rsp)
  je     L46
L315:
  cmpb   $0x30,0x36(%rsp)
  jne    L198
  cmpb   $0x31,0x37(%rsp)
  jne    L198
  lea    D4(%rip),%rdi
  call   <printf@plt>
  jmp    L198
L46:
  cmpb   $0x33,0x38(%rsp)
  jne    L315
  cmpb   $0x33,0x39(%rsp)
  jne    L315
  cmpb   $0x34,0x3a(%rsp)
  jne    L315
  cmpb   $0x36,0x3b(%rsp)
  jne    L315
  lea    D56(%rip),%rdi
  call   <printf@plt>
  jmp    L22
L72:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_tag: D29
data_type: string
name: read_data
arguments: data_tag: D13
data_type: string
name: read_data
arguments: data_tag: D26
data_type: string
name: read_data
arguments: data_tag: D57
data_type: string
name: read_data
arguments: data_tag: D3
data_type: string
name: read_data
arguments: data_tag: D4
data_type: string
name: read_data
arguments: data_tag: D56
data_type: string

tool: D29: %s

tool: D13: 0


tool: D26: 1


tool: D57: Alyson Books


tool: D3: FUNimation Productions, Ltd.


tool: D4: Pyramid Books


tool: D56: 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;
}
```