user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<check>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  push   %rbx
  xor    %ebx,%ebx
  sub    $0x4b8,%rsp
  movdqa D148(%rip),%xmm0
  mov    %fs:0x28,%rax
  mov    %rax,0x4a8(%rsp)
  xor    %eax,%eax
  lea    0x38(%rsp),%rax
  lea    0x280(%rsp),%rbp
  movaps %xmm0,0x80(%rsp)
  movdqa D97(%rip),%xmm0
  lea    0x80(%rsp),%r15
  lea    0x180(%rsp),%r14
  lea    0x380(%rsp),%r13
  movaps %xmm0,0x90(%rsp)
  movdqa D269(%rip),%xmm0
  movaps %xmm0,0xa0(%rsp)
  movdqa D346(%rip),%xmm0
  movaps %xmm0,0xb0(%rsp)
  movdqa D233(%rip),%xmm0
  movaps %xmm0,0xc0(%rsp)
  movdqa D285(%rip),%xmm0
  movaps %xmm0,0xd0(%rsp)
  movdqa D153(%rip),%xmm0
  movaps %xmm0,0xe0(%rsp)
  movdqa D229(%rip),%xmm0
  movaps %xmm0,0xf0(%rsp)
  movdqa D87(%rip),%xmm0
  movaps %xmm0,0x100(%rsp)
  movdqa D315(%rip),%xmm0
  movaps %xmm0,0x110(%rsp)
  movdqa D334(%rip),%xmm0
  movaps %xmm0,0x120(%rsp)
  movdqa D130(%rip),%xmm0
  movaps %xmm0,0x130(%rsp)
  movdqa D372(%rip),%xmm0
  movaps %xmm0,0x140(%rsp)
  movdqa D163(%rip),%xmm0
  movaps %xmm0,0x150(%rsp)
  movdqa D292(%rip),%xmm0
  movaps %xmm0,0x160(%rsp)
  movdqa D102(%rip),%xmm0
  movaps %xmm0,0x170(%rsp)
  movdqa D357(%rip),%xmm0
  movaps %xmm0,0x180(%rsp)
  movdqa D42(%rip),%xmm0
  movaps %xmm0,0x190(%rsp)
  movdqa D10(%rip),%xmm0
  movaps %xmm0,0x1a0(%rsp)
  movdqa D190(%rip),%xmm0
  movaps %xmm0,0x1b0(%rsp)
  movdqa D370(%rip),%xmm0
  movaps %xmm0,0x1c0(%rsp)
  movdqa D89(%rip),%xmm0
  movaps %xmm0,0x1d0(%rsp)
  movdqa D234(%rip),%xmm0
  movaps %xmm0,0x1e0(%rsp)
  movdqa D18(%rip),%xmm0
  movaps %xmm0,0x1f0(%rsp)
  movdqa D145(%rip),%xmm0
  movaps %xmm0,0x200(%rsp)
  movdqa D228(%rip),%xmm0
  movaps %xmm0,0x210(%rsp)
  movdqa D95(%rip),%xmm0
  movaps %xmm0,0x220(%rsp)
  movdqa D100(%rip),%xmm0
  movaps %xmm0,0x230(%rsp)
  movdqa D362(%rip),%xmm0
  mov    %rax,0x20(%rsp)
  lea    0x40(%rsp),%rax
  movaps %xmm0,0x240(%rsp)
  movdqa D359(%rip),%xmm0
  mov    %rax,0x18(%rsp)
  lea    0x60(%rsp),%rax
  movaps %xmm0,0x250(%rsp)
  movdqa D68(%rip),%xmm0
  mov    %rax,0x10(%rsp)
  lea    0x30(%rsp),%rax
  movaps %xmm0,0x260(%rsp)
  movdqa D321(%rip),%xmm0
  mov    %rax,0x28(%rsp)
  movaps %xmm0,0x270(%rsp)
  movdqa D183(%rip),%xmm0
  movaps %xmm0,0x40(%rsp)
  movdqa D168(%rip),%xmm0
  movaps %xmm0,0x50(%rsp)
  movdqa D106(%rip),%xmm0
  movaps %xmm0,0x60(%rsp)
  movdqa D6(%rip),%xmm0
  movaps %xmm0,0x70(%rsp)
  jmp    L24
  xchg   %ax,%ax
L45:
  mov    $0x100,%edx
  xor    %esi,%esi
  mov    %rbp,%rdi
  call   <memset@plt>
  sub    $0x8,%rsp
  mov    %r14,%r9
  mov    %r13,%rcx
  movq   $0x0,0x38(%rsp)
  xor    %edx,%edx
  mov    %rbp,%rdi
  push   0x20(%rsp)
  push   0x20(%rsp)
  push   %rbx
  mov    0x58(%rsp),%r8
  mov    0x48(%rsp),%rsi
  call   <crypto_aead_decrypt@plt>
  add    $0x20,%rsp
  test   %rax,%rax
  jne    L2
  mov    0x30(%rsp),%rdx
  mov    %r15,%rsi
  mov    %rbp,%rdi
  call   <memcmp@plt>
  test   %rax,%rax
  jne    L70
  add    $0x1,%rbx
  add    0x38(%rsp),%r12
  cmp    $0x100,%rbx
  je     L54
L24:
  xor    %esi,%esi
  mov    $0x100,%edx
  mov    %rbp,%rdi
  mov    %ebx,0xc(%rsp)
  call   <memset@plt>
  mov    0xc(%rsp),%edx
  mov    %r15,%rsi
  mov    %rbp,%rdi
  call   <memcpy@plt>
  mov    %rbx,0x30(%rsp)
  mov    %rbp,%rdx
  mov    %r13,%rdi
  sub    $0x8,%rsp
  mov    %rbx,%r9
  mov    %r14,%r8
  mov    %rbx,%rcx
  movq   $0x0,0x40(%rsp)
  push   0x20(%rsp)
  push   0x20(%rsp)
  push   $0x0
  mov    0x40(%rsp),%rsi
  call   <crypto_aead_encrypt@plt>
  mov    0x58(%rsp),%rdx
  mov    %r13,%rsi
  mov    %r12,%rdi
  add    $0x20,%rsp
  call   <memcmp@plt>
  test   %rax,%rax
  je     L45
  mov    $0x1,%edx
L22:
  mov    0xc(%rsp),%esi
  lea    D355(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    $0xffffffff,%eax
L25:
  mov    0x4a8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L29
  add    $0x4b8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L2:
  mov    $0x2,%edx
  jmp    L22
L70:
  mov    $0x3,%edx
  jmp    L22
L54:
  lea    D335(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  jmp    L25
L29:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: label: D148
type_guessed: byte[16]
name: parse_data
arguments: label: D97
type_guessed: byte[16]
name: parse_data
arguments: label: D269
type_guessed: byte[16]
name: parse_data
arguments: label: D346
type_guessed: byte[16]
name: parse_data
arguments: label: D233
type_guessed: byte[16]
name: parse_data
arguments: label: D285
type_guessed: byte[16]
name: parse_data
arguments: label: D153
type_guessed: byte[16]
name: parse_data
arguments: label: D229
type_guessed: byte[16]
name: parse_data
arguments: label: D87
type_guessed: byte[16]
name: parse_data
arguments: label: D315
type_guessed: byte[16]
name: parse_data
arguments: label: D334
type_guessed: byte[16]
name: parse_data
arguments: label: D130
type_guessed: byte[16]
name: parse_data
arguments: label: D372
type_guessed: byte[16]
name: parse_data
arguments: label: D163
type_guessed: byte[16]
name: parse_data
arguments: label: D292
type_guessed: byte[16]
name: parse_data
arguments: label: D102
type_guessed: byte[16]
name: parse_data
arguments: label: D357
type_guessed: byte[16]
name: parse_data
arguments: label: D42
type_guessed: byte[16]
name: parse_data
arguments: label: D10
type_guessed: byte[16]
name: parse_data
arguments: label: D190
type_guessed: byte[16]
name: parse_data
arguments: label: D370
type_guessed: byte[16]
name: parse_data
arguments: label: D89
type_guessed: byte[16]
name: parse_data
arguments: label: D234
type_guessed: byte[16]
name: parse_data
arguments: label: D18
type_guessed: byte[16]
name: parse_data
arguments: label: D145
type_guessed: byte[16]
name: parse_data
arguments: label: D228
type_guessed: byte[16]
name: parse_data
arguments: label: D95
type_guessed: byte[16]
name: parse_data
arguments: label: D100
type_guessed: byte[16]
name: parse_data
arguments: label: D362
type_guessed: byte[16]
name: parse_data
arguments: label: D359
type_guessed: byte[16]
name: parse_data
arguments: label: D68
type_guessed: byte[16]
name: parse_data
arguments: label: D321
type_guessed: byte[16]
name: parse_data
arguments: label: D183
type_guessed: byte[16]
name: parse_data
arguments: label: D168
type_guessed: byte[16]
name: parse_data
arguments: label: D106
type_guessed: byte[16]
name: parse_data
arguments: label: D6
type_guessed: byte[16]
name: parse_data
arguments: label: D355
type_guessed: string
name: parse_data
arguments: label: D335
type_guessed: string

tool: {"D148": [0x7b,0x40,0x05,0xca,0x8f,0x54,0x19,0xde,0xa3,0x68,0x2d,0xf2,0xb7,0x7c,0x41,0x06]}

tool: {"D97": [0xcb,0x90,0x55,0x1a,0xdf,0xa4,0x69,0x2e,0xf3,0xb8,0x7d,0x42,0x07,0xcc,0x91,0x56]}

tool: {"D269": [0x1b,0xe0,0xa5,0x6a,0x2f,0xf4,0xb9,0x7e,0x43,0x08,0xcd,0x92,0x57,0x1c,0xe1,0xa6]}

tool: {"D346": [0x6b,0x30,0xf5,0xba,0x7f,0x44,0x09,0xce,0x93,0x58,0x1d,0xe2,0xa7,0x6c,0x31,0xf6]}

tool: {"D233": [0xbb,0x80,0x45,0x0a,0xcf,0x94,0x59,0x1e,0xe3,0xa8,0x6d,0x32,0xf7,0xbc,0x81,0x46]}

tool: {"D285": [0x0b,0xd0,0x95,0x5a,0x1f,0xe4,0xa9,0x6e,0x33,0xf8,0xbd,0x82,0x47,0x0c,0xd1,0x96]}

tool: {"D153": [0x5b,0x20,0xe5,0xaa,0x6f,0x34,0xf9,0xbe,0x83,0x48,0x0d,0xd2,0x97,0x5c,0x21,0xe6]}

tool: {"D229": [0xab,0x70,0x35,0xfa,0xbf,0x84,0x49,0x0e,0xd3,0x98,0x5d,0x22,0xe7,0xac,0x71,0x36]}

tool: {"D87": [0xfb,0xc0,0x85,0x4a,0x0f,0xd4,0x99,0x5e,0x23,0xe8,0xad,0x72,0x37,0xfc,0xc1,0x86]}

tool: {"D315": [0x4b,0x10,0xd5,0x9a,0x5f,0x24,0xe9,0xae,0x73,0x38,0xfd,0xc2,0x87,0x4c,0x11,0xd6]}

tool: {"D334": [0x9b,0x60,0x25,0xea,0xaf,0x74,0x39,0xfe,0xc3,0x88,0x4d,0x12,0xd7,0x9c,0x61,0x26]}

tool: {"D130": [0xeb,0xb0,0x75,0x3a,0xff,0xc4,0x89,0x4e,0x13,0xd8,0x9d,0x62,0x27,0xec,0xb1,0x76]}

tool: {"D372": [0x3b,0x00,0xc5,0x8a,0x4f,0x14,0xd9,0x9e,0x63,0x28,0xed,0xb2,0x77,0x3c,0x01,0xc6]}

tool: {"D163": [0x8b,0x50,0x15,0xda,0x9f,0x64,0x29,0xee,0xb3,0x78,0x3d,0x02,0xc7,0x8c,0x51,0x16]}

tool: {"D292": [0xdb,0xa0,0x65,0x2a,0xef,0xb4,0x79,0x3e,0x03,0xc8,0x8d,0x52,0x17,0xdc,0xa1,0x66]}

tool: {"D102": [0x2b,0xf0,0xb5,0x7a,0x3f,0x04,0xc9,0x8e,0x53,0x18,0xdd,0xa2,0x67,0x2c,0xf1,0xb6]}

tool: {"D357": [0x7b,0x3c,0xfd,0xbe,0x7f,0x40,0x01,0xc2,0x83,0x44,0x05,0xc6,0x87,0x48,0x09,0xca]}

tool: {"D42": [0x8b,0x4c,0x0d,0xce,0x8f,0x50,0x11,0xd2,0x93,0x54,0x15,0xd6,0x97,0x58,0x19,0xda]}

tool: {"D10": [0x9b,0x5c,0x1d,0xde,0x9f,0x60,0x21,0xe2,0xa3,0x64,0x25,0xe6,0xa7,0x68,0x29,0xea]}

tool: {"D190": [0xab,0x6c,0x2d,0xee,0xaf,0x70,0x31,0xf2,0xb3,0x74,0x35,0xf6,0xb7,0x78,0x39,0xfa]}

tool: {"D370": [0xbb,0x7c,0x3d,0xfe,0xbf,0x80,0x41,0x02,0xc3,0x84,0x45,0x06,0xc7,0x88,0x49,0x0a]}

tool: {"D89": [0xcb,0x8c,0x4d,0x0e,0xcf,0x90,0x51,0x12,0xd3,0x94,0x55,0x16,0xd7,0x98,0x59,0x1a]}

tool: {"D234": [0xdb,0x9c,0x5d,0x1e,0xdf,0xa0,0x61,0x22,0xe3,0xa4,0x65,0x26,0xe7,0xa8,0x69,0x2a]}

tool: {"D18": [0xeb,0xac,0x6d,0x2e,0xef,0xb0,0x71,0x32,0xf3,0xb4,0x75,0x36,0xf7,0xb8,0x79,0x3a]}

tool: {"D145": [0xfb,0xbc,0x7d,0x3e,0xff,0xc0,0x81,0x42,0x03,0xc4,0x85,0x46,0x07,0xc8,0x89,0x4a]}

tool: {"D228": [0x0b,0xcc,0x8d,0x4e,0x0f,0xd0,0x91,0x52,0x13,0xd4,0x95,0x56,0x17,0xd8,0x99,0x5a]}

tool: {"D95": [0x1b,0xdc,0x9d,0x5e,0x1f,0xe0,0xa1,0x62,0x23,0xe4,0xa5,0x66,0x27,0xe8,0xa9,0x6a]}

tool: {"D100": [0x2b,0xec,0xad,0x6e,0x2f,0xf0,0xb1,0x72,0x33,0xf4,0xb5,0x76,0x37,0xf8,0xb9,0x7a]}

tool: {"D362": [0x3b,0xfc,0xbd,0x7e,0x3f,0x00,0xc1,0x82,0x43,0x04,0xc5,0x86,0x47,0x08,0xc9,0x8a]}

tool: {"D359": [0x4b,0x0c,0xcd,0x8e,0x4f,0x10,0xd1,0x92,0x53,0x14,0xd5,0x96,0x57,0x18,0xd9,0x9a]}

tool: {"D68": [0x5b,0x1c,0xdd,0x9e,0x5f,0x20,0xe1,0xa2,0x63,0x24,0xe5,0xa6,0x67,0x28,0xe9,0xaa]}

tool: {"D321": [0x6b,0x2c,0xed,0xae,0x6f,0x30,0xf1,0xb2,0x73,0x34,0xf5,0xb6,0x77,0x38,0xf9,0xba]}

tool: {"D183": [0x7b,0x3a,0xf9,0xb8,0x77,0x36,0xf5,0xb4,0x73,0x32,0xf1,0xb0,0x6f,0x2e,0xed,0xac]}

tool: {"D168": [0x6b,0x2a,0xe9,0xa8,0x67,0x26,0xe5,0xa4,0x63,0x22,0xe1,0xa0,0x5f,0x1e,0xdd,0x9c]}

tool: {"D106": [0x7b,0x30,0xe5,0x9a,0x4f,0x04,0xb9,0x6e,0x23,0xd8,0x8d,0x42,0xf7,0xac,0x61,0x16]}

tool: {"D6": [0xcb,0x80,0x35,0xea,0x9f,0x54,0x09,0xbe,0x73,0x28,0xdd,0x92,0x47,0xfc,0xb1,0x66]}

tool: D355: fail at %u:%d


tool: D335: ok

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;
}
```