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

```asm
<test_hex>:
  endbr64
  push   %r15
  lea    D62(%rip),%rdi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  sub    $0x70,%rsp
  movdqa D34(%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 D48(%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    L33
  lea    D43(%rip),%r13
  lea    0x10(%rsp),%r15
  mov    %r13,%rdi
  call   <printf@plt>
  lea    D63(%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    L33
  mov    %r13,%rdi
  call   <printf@plt>
  lea    D28(%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    L33
  mov    %r13,%rdi
  call   <printf@plt>
  lea    D0(%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    L33
  mov    %r13,%rdi
  call   <printf@plt>
  lea    D19(%rip),%rdi
  call   <printf@plt>
L55:
  mov    0x68(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L40
  add    $0x70,%rsp
  mov    %r12d,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L33:
  lea    D40(%rip),%rdi
  mov    $0xffffffff,%r12d
  call   <printf@plt>
  jmp    L55
L40:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_tag: D62
data_type: string
name: read_data
arguments: data_tag: D34
data_type: byte[16]
name: read_data
arguments: data_tag: D48
data_type: byte[16]
name: read_data
arguments: data_tag: D43
data_type: string
name: read_data
arguments: data_tag: D63
data_type: string
name: read_data
arguments: data_tag: D28
data_type: string
name: read_data
arguments: data_tag: D0
data_type: string
name: read_data
arguments: data_tag: D19
data_type: string
name: read_data
arguments: data_tag: D40
data_type: string

tool: D62: Testing libkeccak_behex_lower: 

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

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

tool: D43: OK


tool: D63: Testing libkeccak_behex_upper: 

tool: D28: Testing libkeccak_unhex on uppercase: 

tool: D0: Testing libkeccak_unhex on lowercase: 

tool: D19: 


tool: D40: 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;
}
```