user: 请从给定的汇编指令推导出C源代码:

```asm
<check>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %esi,-0x4c(%rbp)
  mov    %edx,-0x50(%rbp)
  mov    %rcx,-0x58(%rbp)
  mov    %r8d,-0x5c(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x28(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  mov    %rax,%rbx
  mov    -0x50(%rbp),%eax
  add    $0xa,%eax
  mov    %eax,-0x3c(%rbp)
  mov    -0x3c(%rbp),%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x38(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%r12
  mov    $0x0,%r13d
  movslq %eax,%rdx
  mov    %rdx,%r10
  mov    $0x0,%r11d
  cltq
  mov    $0x10,%edx
  sub    $0x1,%rdx
  add    %rdx,%rax
  mov    $0x10,%edi
  mov    $0x0,%edx
  div    %rdi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L95:
  cmp    %rdx,%rsp
  je     L87
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L95
L87:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L88
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L88:
  mov    %rsp,%rax
  add    $0x0,%rax
  mov    %rax,-0x30(%rbp)
  mov    -0x3c(%rbp),%edx
  mov    -0x30(%rbp),%rax
  mov    $0x2a,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  mov    -0x3c(%rbp),%eax
  sub    $0x1,%eax
  mov    -0x30(%rbp),%rdx
  cltq
  movb   $0x0,(%rdx,%rax,1)
  mov    -0x5c(%rbp),%edx
  mov    -0x50(%rbp),%ecx
  mov    -0x30(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <rlstr@plt>
  mov    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cmp    %eax,-0x50(%rbp)
  jg     L27
  mov    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,%ecx
  mov    -0x50(%rbp),%esi
  mov    -0x4c(%rbp),%edx
  mov    -0x48(%rbp),%rax
  mov    %esi,%r8d
  mov    %rax,%rsi
  lea    D38(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L52
L27:
  mov    -0x58(%rbp),%rdx
  mov    -0x30(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L14
  mov    -0x58(%rbp),%rsi
  mov    -0x30(%rbp),%rcx
  mov    -0x4c(%rbp),%edx
  mov    -0x48(%rbp),%rax
  mov    %rsi,%r8
  mov    %rax,%rsi
  lea    D22(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L52
L14:
  mov    -0x30(%rbp),%rdx
  mov    -0x50(%rbp),%eax
  cltq
  movzbl (%rdx,%rax,1),%eax
  cmp    $0x2a,%al
  je     L6
  mov    -0x4c(%rbp),%edx
  mov    -0x48(%rbp),%rax
  mov    %rax,%rsi
  lea    D3(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L52
L6:
  mov    -0x30(%rbp),%rcx
  mov    -0x4c(%rbp),%edx
  mov    -0x48(%rbp),%rax
  mov    %rax,%rsi
  lea    D28(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L52:
  mov    %rbx,%rsp
  nop
  mov    -0x28(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L81
  call   <__stack_chk_fail@plt>
L81:
  lea    -0x18(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %rbp
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D38
type_guessed: string
name: unpack_data
arguments: data_tag: D22
type_guessed: string
name: unpack_data
arguments: data_tag: D3
type_guessed: string
name: unpack_data
arguments: data_tag: D28
type_guessed: string

tool: D38: %s:%i: FAILED overflow 1 (%i over %i)


tool: D22: %s:%i: FAILED "%s" != "%s"


tool: D3: %s:%i: FAILED overflow 2


tool: D28: %s:%i: OK "%s"


assistant: ```c
void check(const char *file, int line, int len, const char *exp, int mask) {
  int buflen = len + 10;
  char buf[buflen];
  memset(buf, '*', buflen);
  buf[buflen - 1] = '\0';
  rlstr(buf, len, mask);
  if (strlen(buf) >= len)
    printf("%s:%i: FAILED overflow 1 (%i over %i)\n", file, line, (int)strlen(buf), len);
  else if (strcmp(buf, exp))
    printf("%s:%i: FAILED \"%s\" != \"%s\"\n", file, line, buf, exp);
  else if (buf[len] != '*')
    printf("%s:%i: FAILED overflow 2\n", file, line);
  else
    printf("%s:%i: OK \"%s\"\n", file, line, buf);
}
```