user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<main>:
  endbr64
  push   %r12
  lea    D22(%rip),%rdi
  push   %rbp
  push   %rbx
  sub    $0x50,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x48(%rsp)
  xor    %eax,%eax
  lea    0x30(%rsp),%rbp
  mov    %rbp,%rsi
  call   <scanf@plt>
  mov    %rbp,%rdi
  call   <strlen@plt>
  cmp    $0x11,%eax
  jne    L138
  lea    D6(%rip),%r12
  mov    %rbp,%rdi
  mov    %r12,%rsi
  call   <strtok@plt>
  test   %rax,%rax
  je     L44
  mov    %rsp,%rbx
  nopw   0x0(%rax,%rax,1)
L69:
  mov    %r12,%rsi
  xor    %edi,%edi
  mov    %rax,(%rbx)
  add    $0x8,%rbx
  call   <strtok@plt>
  test   %rax,%rax
  jne    L69
L44:
  mov    (%rsp),%r12
  lea    D75(%rip),%rsi
  mov    %r12,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L110
  lea    D126(%rip),%rsi
  mov    %r12,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L138
L110:
  mov    %rbp,%rdi
  call   <checkISBN@plt>
  mov    0x20(%rsp),%rdx
  movsbl %al,%eax
  movsbl (%rdx),%edx
  sub    $0x30,%edx
  cmp    %edx,%eax
  je     L113
L138:
  lea    D39(%rip),%rdi
  call   <printf@plt>
L5:
  mov    0x48(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L88
  add    $0x50,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L113:
  lea    D103(%rip),%rdi
  call   <printf@plt>
  mov    0x10(%rsp),%rbp
  lea    D84(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L146
  lea    D100(%rip),%rdi
  call   <printf@plt>
  jmp    L5
L146:
  lea    D33(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L83
  lea    D47(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L47
  lea    D97(%rip),%rdi
  call   <printf@plt>
  jmp    L5
L83:
  lea    D28(%rip),%rdi
  call   <printf@plt>
  jmp    L5
L47:
  lea    D55(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L5
  lea    D16(%rip),%rdi
  call   <printf@plt>
  jmp    L5
L88:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: label: D22
type_guessed: string
name: retrieve_data
arguments: label: D6
type_guessed: string
name: retrieve_data
arguments: label: D75
type_guessed: string
name: retrieve_data
arguments: label: D126
type_guessed: string
name: retrieve_data
arguments: label: D39
type_guessed: string
name: retrieve_data
arguments: label: D103
type_guessed: string
name: retrieve_data
arguments: label: D84
type_guessed: string
name: retrieve_data
arguments: label: D100
type_guessed: string
name: retrieve_data
arguments: label: D33
type_guessed: string
name: retrieve_data
arguments: label: D47
type_guessed: string
name: retrieve_data
arguments: label: D97
type_guessed: string
name: retrieve_data
arguments: label: D28
type_guessed: string
name: retrieve_data
arguments: label: D55
type_guessed: string
name: retrieve_data
arguments: label: D16
type_guessed: string

tool: D22: %s

tool: D6: -

tool: D75: 978

tool: D126: 979

tool: D39: 0

tool: D103: 1

tool: D84: 933346

tool: D100: 
Bluebridge

tool: D33: 55583

tool: D47: 4210

tool: D97: 
FUNimation Productions, Ltd.

tool: D28: 
Alyson Books

tool: D55: 01

tool: D16: 
Pyramid Books

assistant: ```c
int main() {
  char code[20];
  char *code_elems[5];
  int i, l;
  char *element;
  scanf("%s", code);
  l = strlen(code);
  if (l != 17) {
    printf("0");
    return 0;
  }
  element = strtok(code, "-");
  for (i = 0; element != NULL; i++) {
    code_elems[i] = element;
    element = strtok(NULL, "-");
  }
  if ((strcmp(code_elems[0], "978") != 0) && (strcmp(code_elems[0], "979") != 0)) {
    printf("0");
    return 0;
  }
  if (checkISBN(code) == *code_elems[4] - '0') {
    printf("1");
    if (strcmp(code_elems[2], "933346") == 0) {
      printf("\nBluebridge");
    } else if (strcmp(code_elems[2], "55583") == 0) {
      printf("\nAlyson Books");
    } else if (strcmp(code_elems[2], "4210") == 0) {
      printf("\nFUNimation Productions, Ltd.");
    } else if (strcmp(code_elems[2], "01") == 0) {
      printf("\nPyramid Books");
    }
  } else {
    printf("0");
  }
  return 0;
}
```