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

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  lea    D0(%rip),%r14
  push   %r13
  lea    D25(%rip),%r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xb8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0xa8(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%r15
  lea    0x80(%rsp),%rbp
  nopl   0x0(%rax,%rax,1)
L14:
  mov    $0x1,%eax
  nopl   (%rax)
L184:
  mov    %eax,-0x4(%r15,%rax,4)
  add    $0x1,%rax
  cmp    $0x1a,%rax
  jne    L184
  mov    %rbp,%rsi
  mov    %r14,%rdi
  call   <scanf@plt>
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L118
  lea    D24(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L42
  lea    D32(%rip),%rdi
  call   <puts@plt>
  jmp    L14
L42:
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    %eax,%r12d
  mov    %eax,0x8(%rsp)
  sub    $0x1,%r12d
  jns    L82
  jmp    L177
  nopw   0x0(%rax,%rax,1)
L95:
  mov    %r15,%rcx
  mov    %r12d,%edx
  mov    %rbp,%rsi
  call   <check@plt>
  mov    %eax,%ebx
  cmp    $0x1,%eax
  je     L195
  sub    $0x1,%r12d
  jb     L57
L82:
  movslq %r12d,%rbx
L75:
  movsbl 0x80(%rsp,%rbx,1),%edi
  cmp    $0x20,%dil
  jne    L95
  lea    0x1(%r12),%edx
  mov    %r15,%rcx
  mov    %rbp,%rsi
  movslq %edx,%rax
  movsbl 0x80(%rsp,%rax,1),%edi
  call   <check@plt>
  cmp    $0x1,%eax
  jne    L75
L195:
  mov    $0x1,%ebx
  jmp    L14
L177:
  cmp    $0x1,%ebx
  je     L195
L57:
  mov    0x8(%rsp),%eax
  test   %eax,%eax
  jle    L8
  movslq %eax,%rdx
  xor    %r12d,%r12d
  mov    $0x1,%edi
  jmp    L149
L70:
  add    $0x1,%r12
  cmp    %rdx,%r12
  je     L169
L149:
  cmpb   $0x59,0x0(%rbp,%r12,1)
  jne    L70
  mov    (%r15,%r12,4),%esi
  cmp    $0x14,%esi
  je     L70
  mov    %rdx,0x8(%rsp)
  add    $0x1,%r12
  call   <lcm@plt>
  mov    0x8(%rsp),%rdx
  mov    %rax,%rdi
  cmp    %rdx,%r12
  jne    L149
L169:
  mov    %rdi,%rsi
  xor    %eax,%eax
  lea    D35(%rip),%rdi
  call   <printf@plt>
  jmp    L14
L118:
  mov    0xa8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L56
  add    $0xb8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L8:
  mov    $0x1,%edi
  jmp    L169
L56:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: tag: D0
type_guessed: string
name: read_data
arguments: tag: D25
type_guessed: string
name: read_data
arguments: tag: D24
type_guessed: string
name: read_data
arguments: tag: D32
type_guessed: string
name: read_data
arguments: tag: D35
type_guessed: string

tool: D0: %s

tool: D25: *

tool: D24: N

tool: D32: -1

tool: D35: %llu


assistant: ```c
int main() {
  char input[30];
  int a[25];
  int i, j, c, n;
  unsigned long long int num;
  while (1) {
    unsigned long long int lcms = 1;
    for (i = 0; i < 25; i++) {
      a[i] = (i + 1);
    }
    num = 1;
    scanf("%s", input);
    if (strcmp(input, "*") == 0)
      break;
    if (strcmp(input, "N") == 0) {
      printf("-1\n");
      continue;
    }
    n = strlen(input);
    for (i = n - 1; i >= 0; i--) {
      if (input[i] == ' ')
        i++;
      c = 0;
      c = check(input[i], input, i, a);
      if (c == 1)
        break;
    }
    if (c == 1)
      continue;
    for (i = 0; i < n; i++) {
      if (input[i] == 'Y') {
        if (a[i] != 20)
          lcms = lcm(lcms, a[i]);
      }
    }
    printf("%llu\n", lcms);
  }
  return 0;
}
```