user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<check>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x480,%rsp
  mov    %rdi,%rbx
  mov    %fs:0x28,%rax
  mov    %rax,0x478(%rsp)
  xor    %eax,%eax
  lea    0x50(%rsp),%rax
  lea    0x150(%rsp),%rcx
  mov    $0x7b,%edx
L21:
  mov    %dl,(%rax)
  sub    $0x3b,%edx
  add    $0x1,%rax
  cmp    %rcx,%rax
  jne    L21
  lea    0x150(%rsp),%rax
  lea    0x250(%rsp),%rcx
  mov    $0x7b,%edx
L94:
  mov    %dl,(%rax)
  sub    $0x3f,%edx
  add    $0x1,%rax
  cmp    %rcx,%rax
  jne    L94
  lea    0x10(%rsp),%rdx
  mov    $0x7b,%eax
L115:
  mov    %al,(%rdx)
  sub    $0x41,%eax
  add    $0x1,%rdx
  cmp    $0x5b,%al
  jne    L115
  lea    0x30(%rsp),%rdx
  mov    $0x7b,%eax
L52:
  mov    %al,(%rdx)
  sub    $0x4b,%eax
  add    $0x1,%rdx
  cmp    $0x1b,%al
  jne    L52
  mov    $0x0,%ebp
  lea    0x250(%rsp),%r12
L48:
  mov    %ebp,%r14d
  mov    $0x100,%edx
  mov    $0x0,%esi
  mov    %r12,%rdi
  call   <memset@plt>
  lea    0x50(%rsp),%rsi
  mov    %ebp,%edx
  mov    %r12,%rdi
  call   <memcpy@plt>
  movq   $0x0,0x8(%rsp)
  mov    %rbp,(%rsp)
  lea    0x8(%rsp),%rsi
  lea    0x350(%rsp),%r13
  sub    $0x8,%rsp
  lea    0x18(%rsp),%rax
  push   %rax
  lea    0x40(%rsp),%rax
  push   %rax
  push   $0x0
  mov    %rbp,%r9
  lea    0x170(%rsp),%r8
  mov    %rbp,%rcx
  mov    %r12,%rdx
  mov    %r13,%rdi
  call   <crypto_aead_encrypt@plt>
  add    $0x20,%rsp
  mov    0x8(%rsp),%rdx
  mov    %r13,%rsi
  mov    %rbx,%rdi
  call   <memcmp@plt>
  test   %rax,%rax
  jne    L76
  mov    $0x100,%edx
  mov    $0x0,%esi
  mov    %r12,%rdi
  call   <memset@plt>
  movq   $0x0,(%rsp)
  mov    %r13,%rcx
  mov    %rsp,%rsi
  sub    $0x8,%rsp
  lea    0x18(%rsp),%rax
  push   %rax
  lea    0x40(%rsp),%rax
  push   %rax
  push   %rbp
  lea    0x170(%rsp),%r9
  mov    0x28(%rsp),%r8
  mov    $0x0,%edx
  mov    %r12,%rdi
  call   <crypto_aead_decrypt@plt>
  add    $0x20,%rsp
  test   %rax,%rax
  jne    L100
  lea    0x50(%rsp),%rsi
  mov    (%rsp),%rdx
  mov    %r12,%rdi
  call   <memcmp@plt>
  test   %rax,%rax
  jne    L75
  add    0x8(%rsp),%rbx
  add    $0x1,%rbp
  cmp    $0x100,%rbp
  jne    L48
  lea    D15(%rip),%rdi
  call   <puts@plt>
  mov    $0x0,%eax
  jmp    L25
L76:
  mov    $0x1,%edx
L106:
  mov    %r14d,%esi
  lea    D19(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0xffffffff,%eax
L25:
  mov    0x478(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L95
  add    $0x480,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L100:
  mov    $0x2,%edx
  jmp    L106
L75:
  mov    $0x3,%edx
  jmp    L106
L95:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_label: D15
type_guessed: string
name: retrieve_data
arguments: data_label: D19
type_guessed: string

tool: D15: ok

tool: D19: fail at %u:%d


assistant: ```c
int check(const unsigned char *kat) {
  unsigned char w[256];
  unsigned char h[256];
  unsigned char k[32];
  unsigned char n[32];
  unsigned i;
  int place = 0;
  for (i = 0; i < sizeof w; ++i)
    w[i] = 255 & (i * 197 + 123);
  for (i = 0; i < sizeof h; ++i)
    h[i] = 255 & (i * 193 + 123);
  for (i = 0; i < sizeof k; ++i)
    k[i] = 255 & (i * 191 + 123);
  for (i = 0; i < sizeof n; ++i)
    n[i] = 255 & (i * 181 + 123);
  for (i = 0; i < sizeof w; ++i) {
    unsigned char m[256];
    unsigned char c[256 + 32];
    unsigned long long mlen;
    unsigned long long clen;
    unsigned long long hlen;
    memset(m, 0, sizeof m);
    memcpy(m, w, i);
    clen = 0;
    mlen = hlen = i;
    crypto_aead_encrypt(c, &clen, m, mlen, h, hlen, NULL, n, k);
    if (0 != memcmp(kat, c, clen)) {
      place = 1;
      goto fail;
    }
    memset(m, 0, sizeof m);
    mlen = 0;
    if (0 != crypto_aead_decrypt(m, &mlen, NULL, c, clen, h, hlen, n, k)) {
      place = 2;
      goto fail;
    }
    if (0 != memcmp(m, w, mlen)) {
      place = 3;
      goto fail;
    }
    kat += clen;
  }
  printf("ok\n");
  return 0;
fail:
  printf("fail at %u:%d\n", i, place);
  return -1;
}
```