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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  add    $0xffffffffffffff80,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x7c(%rbp)
  movl   $0x0,-0x78(%rbp)
  movl   $0x0,-0x74(%rbp)
  lea    -0x20(%rbp),%rax
  mov    %rax,%rsi
  lea    D88(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  movzbl -0x20(%rbp),%eax
  cmp    $0x39,%al
  jne    L303
  movzbl -0x1f(%rbp),%eax
  cmp    $0x37,%al
  jne    L303
  movzbl -0x1e(%rbp),%eax
  cmp    $0x39,%al
  je     L182
  movzbl -0x1e(%rbp),%eax
  cmp    $0x38,%al
  jne    L124
L182:
  movl   $0x0,-0x80(%rbp)
  jmp    L347
L142:
  mov    -0x80(%rbp),%eax
  cltq
  movzbl -0x20(%rbp,%rax,1),%eax
  cmp    $0x2f,%al
  jle    L363
  mov    -0x80(%rbp),%eax
  cltq
  movzbl -0x20(%rbp,%rax,1),%eax
  cmp    $0x39,%al
  jg     L363
  mov    -0x80(%rbp),%eax
  cltq
  movzbl -0x20(%rbp,%rax,1),%eax
  movsbl %al,%eax
  lea    -0x30(%rax),%edx
  mov    -0x7c(%rbp),%eax
  cltq
  mov    %edx,-0x70(%rbp,%rax,4)
  addl   $0x1,-0x78(%rbp)
  addl   $0x1,-0x7c(%rbp)
L363:
  addl   $0x1,-0x80(%rbp)
L347:
  cmpl   $0x13,-0x80(%rbp)
  jle    L142
  cmpl   $0xd,-0x78(%rbp)
  je     L272
  lea    D20(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0x0,%eax
  jmp    L275
L272:
  movl   $0x0,-0x80(%rbp)
  jmp    L249
L43:
  mov    -0x80(%rbp),%eax
  cltd
  shr    $0x1f,%edx
  add    %edx,%eax
  and    $0x1,%eax
  sub    %edx,%eax
  cmp    $0x1,%eax
  jne    L226
  mov    -0x80(%rbp),%eax
  cltq
  mov    -0x70(%rbp,%rax,4),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    %eax,-0x74(%rbp)
  jmp    L104
L226:
  mov    -0x80(%rbp),%eax
  cltq
  mov    -0x70(%rbp,%rax,4),%eax
  add    %eax,-0x74(%rbp)
L104:
  addl   $0x1,-0x80(%rbp)
L249:
  cmpl   $0xb,-0x80(%rbp)
  jle    L43
  mov    -0x74(%rbp),%edx
  movslq %edx,%rax
  imul   $0x66666667,%rax,%rax
  shr    $0x20,%rax
  sar    $0x2,%eax
  mov    %edx,%esi
  sar    $0x1f,%esi
  sub    %esi,%eax
  mov    %eax,%ecx
  mov    %ecx,%eax
  shl    $0x2,%eax
  add    %ecx,%eax
  add    %eax,%eax
  sub    %eax,%edx
  mov    %edx,-0x74(%rbp)
  mov    $0xa,%eax
  sub    -0x74(%rbp),%eax
  mov    %eax,-0x74(%rbp)
  mov    -0x40(%rbp),%eax
  cmp    %eax,-0x74(%rbp)
  je     L258
  lea    D20(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0x0,%eax
  jmp    L275
L258:
  lea    D0(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  movzbl -0x1a(%rbp),%eax
  cmp    $0x39,%al
  jne    L237
  movzbl -0x19(%rbp),%eax
  cmp    $0x33,%al
  jne    L237
  movzbl -0x18(%rbp),%eax
  cmp    $0x33,%al
  jne    L237
  movzbl -0x17(%rbp),%eax
  cmp    $0x33,%al
  jne    L237
  movzbl -0x16(%rbp),%eax
  cmp    $0x34,%al
  jne    L237
  movzbl -0x15(%rbp),%eax
  cmp    $0x36,%al
  jne    L237
  lea    D40(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L237:
  movzbl -0x1a(%rbp),%eax
  cmp    $0x35,%al
  jne    L354
  movzbl -0x19(%rbp),%eax
  cmp    $0x35,%al
  jne    L354
  movzbl -0x18(%rbp),%eax
  cmp    $0x35,%al
  jne    L354
  movzbl -0x17(%rbp),%eax
  cmp    $0x38,%al
  jne    L354
  movzbl -0x16(%rbp),%eax
  cmp    $0x33,%al
  jne    L354
  lea    D75(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L354:
  movzbl -0x1a(%rbp),%eax
  cmp    $0x34,%al
  jne    L61
  movzbl -0x19(%rbp),%eax
  cmp    $0x32,%al
  jne    L61
  movzbl -0x18(%rbp),%eax
  cmp    $0x31,%al
  jne    L61
  movzbl -0x17(%rbp),%eax
  cmp    $0x30,%al
  jne    L61
  lea    D37(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L61:
  movzbl -0x1a(%rbp),%eax
  cmp    $0x30,%al
  jne    L310
  movzbl -0x19(%rbp),%eax
  cmp    $0x31,%al
  jne    L310
  lea    D33(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L310
L124:
  lea    D20(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L95
L310:
  nop
  jmp    L95
L303:
  lea    D20(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L95:
  mov    $0x0,%eax
L275:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L254
  call   <__stack_chk_fail@plt>
L254:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_label: D88
data_type: string
name: unpack_data
arguments: data_label: D20
data_type: string
name: unpack_data
arguments: data_label: D0
data_type: string
name: unpack_data
arguments: data_label: D40
data_type: string
name: unpack_data
arguments: data_label: D75
data_type: string
name: unpack_data
arguments: data_label: D37
data_type: string
name: unpack_data
arguments: data_label: D33
data_type: string

tool: D88: %s

tool: D20: 0


tool: D0: 1


tool: D40: Bluebridge

tool: D75: Alyson Books

tool: D37: FUNimation Productions, Ltd.

tool: D33: Pyramid Books

assistant: ```c
int main() {
  int numbers[20];
  int i, j = 0, count = 0, checkdigit = 0;
  char ISBN[20];
  scanf("%s", ISBN);
  if (ISBN[0] == '9' && ISBN[1] == '7') {
    if (ISBN[2] == '9' || ISBN[2] == '8') {
      for (i = 0; i < 20; i++) {
        if (ISBN[i] >= '0' && ISBN[i] <= '9') {
          numbers[j] = (ISBN[i] - 48);
          count++;
          j++;
        }
      }
      if (count != 13) {
        printf("0\n");
        return 0;
      }
      for (i = 0; i < 12; i++) {
        if (i % 2 == 1)
          checkdigit = checkdigit + numbers[i] * 3;
        else
          checkdigit = checkdigit + numbers[i];
      }
      checkdigit = checkdigit % 10;
      checkdigit = 10 - checkdigit;
      if (numbers[12] != checkdigit) {
        printf("0\n");
        return 0;
      }
      printf("1\n");
      if (ISBN[6] == '9' && ISBN[7] == '3' && ISBN[8] == '3' && ISBN[9] == '3' && ISBN[10] == '4' && ISBN[11] == '6')
        printf("Bluebridge");
      if (ISBN[6] == '5' && ISBN[7] == '5' && ISBN[8] == '5' && ISBN[9] == '8' && ISBN[10] == '3')
        printf("Alyson Books");
      if (ISBN[6] == '4' && ISBN[7] == '2' && ISBN[8] == '1' && ISBN[9] == '0')
        printf("FUNimation Productions, Ltd.");
      if (ISBN[6] == '0' && ISBN[7] == '1')
        printf("Pyramid Books");
    } else {
      printf("0\n");
    }
  } else {
    printf("0\n");
  }
  return 0;
}
```