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

```asm
<test_hex>:
  endbr64
  push   %r15
  lea    D57(%rip),%rdi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  sub    $0x70,%rsp
  movdqa D45(%rip),%xmm0
  mov    %fs:0x28,%rax
  mov    %rax,0x68(%rsp)
  movabs $0xa380ff83122f04,%rax
  lea    0x50(%rsp),%rbp
  lea    0x8(%rsp),%r12
  movb   $0x0,0x20(%rsp)
  movaps %xmm0,0x10(%rsp)
  movdqa D79(%rip),%xmm0
  lea    0x30(%rsp),%r14
  movb   $0x0,0x40(%rsp)
  movaps %xmm0,0x30(%rsp)
  mov    %rax,0x8(%rsp)
  call   <printf@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  mov    $0x8,%edx
  call   <libkeccak_behex_lower@plt>
  mov    %r14,%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L17
  lea    D81(%rip),%r13
  lea    0x10(%rsp),%r15
  mov    %r13,%rdi
  call   <printf@plt>
  lea    D23(%rip),%rdi
  call   <printf@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  mov    $0x8,%edx
  call   <libkeccak_behex_upper@plt>
  mov    %r15,%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L17
  mov    %r13,%rdi
  call   <printf@plt>
  lea    D35(%rip),%rdi
  call   <printf@plt>
  mov    %r15,%rsi
  mov    %rbp,%rdi
  call   <libkeccak_unhex@plt>
  mov    $0x8,%edx
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <memcmp@plt>
  test   %eax,%eax
  jne    L17
  mov    %r13,%rdi
  call   <printf@plt>
  lea    D32(%rip),%rdi
  call   <printf@plt>
  mov    %r14,%rsi
  mov    %rbp,%rdi
  call   <libkeccak_unhex@plt>
  mov    %r12,%rdi
  mov    $0x8,%edx
  mov    %rbp,%rsi
  call   <memcmp@plt>
  mov    %eax,%r12d
  test   %eax,%eax
  jne    L17
  mov    %r13,%rdi
  call   <printf@plt>
  lea    D55(%rip),%rdi
  call   <printf@plt>
L20:
  mov    0x68(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L6
  add    $0x70,%rsp
  mov    %r12d,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L17:
  lea    D1(%rip),%rdi
  mov    $0xffffffff,%r12d
  call   <printf@plt>
  jmp    L20
L6:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: tag: D57
type_infered: string
name: retrieve_data
arguments: tag: D45
type_infered: byte[16]
name: retrieve_data
arguments: tag: D79
type_infered: byte[16]
name: retrieve_data
arguments: tag: D81
type_infered: string
name: retrieve_data
arguments: tag: D23
type_infered: string
name: retrieve_data
arguments: tag: D35
type_infered: string
name: retrieve_data
arguments: tag: D32
type_infered: string
name: retrieve_data
arguments: tag: D55
type_infered: string
name: retrieve_data
arguments: tag: D1
type_infered: string

tool: D57: Testing libkeccak_behex_lower: 

tool: {"D45": [0x30,0x34,0x32,0x46,0x31,0x32,0x38,0x33,0x46,0x46,0x38,0x30,0x41,0x33,0x30,0x30]}

tool: {"D79": [0x30,0x34,0x32,0x66,0x31,0x32,0x38,0x33,0x66,0x66,0x38,0x30,0x61,0x33,0x30,0x30]}

tool: D81: OK


tool: D23: Testing libkeccak_behex_upper: 

tool: D35: Testing libkeccak_unhex on uppercase: 

tool: D32: Testing libkeccak_unhex on lowercase: 

tool: D55: 


tool: D1: Fail


assistant: ```c
int test_hex(void) {
  const unsigned char bindata[] = {0x04, 0x2F, 0x12, 0x83, 0xFF, 0x80, 0xA3, 0x00};
  const char hexdata_upper[] = "042F1283FF80A300";
  const char hexdata_lower[] = "042f1283ff80a300";
  char hextest[2 * 8 + 1];
  printf("Testing libkeccak_behex_lower: ");
  libkeccak_behex_lower(hextest, (const char *)bindata, 8);
  if (!strcmp(hextest, hexdata_lower)) {
    printf("OK\n");
  } else {
    printf("Fail\n");
    return -1;
  }
  printf("Testing libkeccak_behex_upper: ");
  libkeccak_behex_upper(hextest, (const char *)bindata, 8);
  if (!strcmp(hextest, hexdata_upper)) {
    printf("OK\n");
  } else {
    printf("Fail\n");
    return -1;
  }
  printf("Testing libkeccak_unhex on uppercase: ");
  libkeccak_unhex(hextest, hexdata_upper);
  if (!memcmp(bindata, hextest, 8 * sizeof(char))) {
    printf("OK\n");
  } else {
    printf("Fail\n");
    return -1;
  }
  printf("Testing libkeccak_unhex on lowercase: ");
  libkeccak_unhex(hextest, hexdata_lower);
  if (!memcmp(bindata, hextest, 8 * sizeof(char))) {
    printf("OK\n");
  } else {
    printf("Fail\n");
    return -1;
  }
  printf("\n");
  return 0;
}
```