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

```asm
<check>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x28(%rbp),%rax
  movzbl 0x2(%rax),%eax
  mov    %al,-0xc(%rbp)
  mov    -0x28(%rbp),%rax
  movzbl 0x3(%rax),%eax
  mov    %al,-0xb(%rbp)
  mov    -0x28(%rbp),%rax
  movzbl 0x4(%rax),%eax
  mov    %al,-0xa(%rbp)
  mov    -0x28(%rbp),%rax
  movzbl 0x5(%rax),%eax
  mov    %al,-0x9(%rbp)
  lea    -0xc(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,-0x14(%rbp)
  lea    -0xa(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,-0x10(%rbp)
  cmpl   $0x1f,-0x10(%rbp)
  jle    L69
  mov    $0x0,%eax
  jmp    L105
L69:
  cmpl   $0xc,-0x14(%rbp)
  jle    L50
  cmpl   $0x13,-0x14(%rbp)
  jle    L96
  cmpl   $0x20,-0x14(%rbp)
  jle    L50
L96:
  cmpl   $0x27,-0x14(%rbp)
  jle    L67
  cmpl   $0x34,-0x14(%rbp)
  jle    L50
L67:
  mov    $0x0,%eax
  jmp    L105
L50:
  movl   $0x0,-0x18(%rbp)
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x30,%eax
  add    %eax,%eax
  add    %eax,-0x18(%rbp)
  mov    -0x28(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x30,%eax
  shl    $0x2,%eax
  add    %eax,-0x18(%rbp)
  mov    -0x28(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x30,%eax
  shl    $0x3,%eax
  add    %eax,-0x18(%rbp)
  mov    -0x28(%rbp),%rax
  add    $0x3,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  lea    -0x30(%rax),%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,-0x18(%rbp)
  mov    -0x28(%rbp),%rax
  add    $0x4,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  lea    -0x30(%rax),%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%eax
  add    %eax,-0x18(%rbp)
  mov    -0x28(%rbp),%rax
  add    $0x5,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  lea    -0x30(%rax),%edx
  mov    %edx,%eax
  shl    $0x3,%eax
  add    %edx,%eax
  add    %eax,-0x18(%rbp)
  mov    -0x28(%rbp),%rax
  add    $0x6,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  lea    -0x30(%rax),%edx
  mov    %edx,%eax
  shl    $0x3,%eax
  sub    %edx,%eax
  add    %eax,-0x18(%rbp)
  mov    -0x28(%rbp),%rax
  add    $0x7,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  lea    -0x30(%rax),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    %eax,-0x18(%rbp)
  mov    -0x28(%rbp),%rax
  add    $0x8,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  lea    -0x30(%rax),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    %eax,%eax
  add    %eax,-0x18(%rbp)
  mov    -0x18(%rbp),%edx
  movslq %edx,%rax
  imul   $0x2e8ba2e9,%rax,%rax
  shr    $0x20,%rax
  sar    %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
  add    %ecx,%eax
  sub    %eax,%edx
  mov    %edx,-0x18(%rbp)
  cmpl   $0xa,-0x18(%rbp)
  jne    L6
  movl   $0x0,-0x18(%rbp)
L6:
  mov    -0x28(%rbp),%rax
  add    $0x9,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x30,%eax
  cmp    %eax,-0x18(%rbp)
  je     L26
  mov    $0x0,%eax
  jmp    L105
L26:
  mov    $0x1,%eax
L105:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L34
  call   <__stack_chk_fail@plt>
L34:
  leave
  ret
```

assistant: ```c
int check(char *data) {
  char month[2] = {data[2], data[3]};
  char day[2] = {data[4], data[5]};
  int int_month = atoi(month);
  int int_day = atoi(day);
  if (int_day > 31) {
    return 0;
  }
  if (!((int_month <= 12) || ((int_month >= 20) && (int_month <= 32)) || ((int_month >= 40) && (int_month <= 52)))) {
    return 0;
  }
  int full = 0;
  full += (data[0] - '0') * 2;
  full += (data[1] - '0') * 4;
  full += (data[2] - '0') * 8;
  full += (data[3] - '0') * 5;
  full += (data[4] - '0') * 10;
  full += (data[5] - '0') * 9;
  full += (data[6] - '0') * 7;
  full += (data[7] - '0') * 3;
  full += (data[8] - '0') * 6;
  full %= 11;
  if (full == 10) {
    full = 0;
  }
  if ((data[9] - '0') != full) {
    return 0;
  }
  return 1;
}
```