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

```asm
<haval_cert>:
  endbr64
  push   %r13
  mov    $0xa,%edi
  lea    D109(%rip),%r13
  push   %r12
  lea    D41(%rip),%r12
  push   %rbp
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rbp
  call   <putchar@plt>
  mov    $0x80,%edx
  mov    $0x3,%esi
  xor    %eax,%eax
  lea    D46(%rip),%rdi
  call   <printf@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    %r12,%rdi
  mov    %rbp,%rsi
  call   <haval_string@plt>
  mov    %r12,%rsi
  lea    D93(%rip),%r12
  xor    %eax,%eax
  mov    %r12,%rdi
  call   <printf@plt>
  mov    %rbp,%rdi
  call   <haval_print@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    %r13,%rdi
  mov    %rbp,%rsi
  call   <haval_string@plt>
  mov    %r13,%rsi
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %rbp,%rdi
  lea    D106(%rip),%r13
  call   <haval_print@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    %r13,%rdi
  mov    %rbp,%rsi
  call   <haval_string@plt>
  mov    %r13,%rsi
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %rbp,%rdi
  lea    D29(%rip),%r13
  call   <haval_print@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    %r13,%rdi
  mov    %rbp,%rsi
  call   <haval_string@plt>
  mov    %r13,%rsi
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %rbp,%rdi
  lea    D10(%rip),%r13
  call   <haval_print@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    %rbp,%rsi
  mov    %r13,%rdi
  call   <haval_string@plt>
  mov    %r13,%rsi
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %rbp,%rdi
  lea    D74(%rip),%r12
  call   <haval_print@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    %r12,%rdi
  mov    %rbp,%rsi
  call   <haval_string@plt>
  mov    %r12,%rsi
  xor    %eax,%eax
  lea    D112(%rip),%rdi
  call   <printf@plt>
  mov    %rbp,%rdi
  lea    D98(%rip),%r12
  call   <haval_print@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <haval_file@plt>
  mov    %r12,%rsi
  test   %rax,%rax
  je     L8
  lea    D12(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
L7:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L26
  add    $0x20,%rsp
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nop
L8:
  lea    D56(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %rbp,%rdi
  call   <haval_print@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  jmp    L7
L26:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_tag: D109
datatype: string
name: retrieve_data
arguments: data_tag: D41
datatype: string
name: retrieve_data
arguments: data_tag: D46
datatype: string
name: retrieve_data
arguments: data_tag: D93
datatype: string
name: retrieve_data
arguments: data_tag: D106
datatype: string
name: retrieve_data
arguments: data_tag: D29
datatype: string
name: retrieve_data
arguments: data_tag: D10
datatype: string
name: retrieve_data
arguments: data_tag: D74
datatype: string
name: retrieve_data
arguments: data_tag: D112
datatype: string
name: retrieve_data
arguments: data_tag: D98
datatype: string
name: retrieve_data
arguments: data_tag: D12
datatype: string
name: retrieve_data
arguments: data_tag: D56
datatype: string

tool: D109: a

tool: 

tool: D46: HAVAL certification data (PASS=%d, FPTLEN=%d):

tool: D93: HAVAL("%s") = 

tool: D106: HAVAL

tool: D29: 0123456789

tool: D10: abcdefghijklmnopqrstuvwxyz

tool: D74: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789

tool: D112: HAVAL("%s")
      = 

tool: D98: pi.frac

tool: D12: %s can not be opened !


tool: D56: HAVAL(File %s) = 

assistant: ```c
void haval_cert(void) {
  unsigned int i;
  char *str;
  unsigned char fingerprint[128 >> 3];
  printf("\n");
  printf("HAVAL certification data (PASS=%d, FPTLEN=%d):", 3, 128);
  printf("\n");
  str = "";
  haval_string(str, fingerprint);
  printf("HAVAL(\"%s\") = ", str);
  haval_print(fingerprint);
  printf("\n");
  str = "a";
  haval_string(str, fingerprint);
  printf("HAVAL(\"%s\") = ", str);
  haval_print(fingerprint);
  printf("\n");
  str = "HAVAL";
  haval_string(str, fingerprint);
  printf("HAVAL(\"%s\") = ", str);
  haval_print(fingerprint);
  printf("\n");
  str = "0123456789";
  haval_string(str, fingerprint);
  printf("HAVAL(\"%s\") = ", str);
  haval_print(fingerprint);
  printf("\n");
  str = "abcdefghijklmnopqrstuvwxyz";
  haval_string(str, fingerprint);
  printf("HAVAL(\"%s\") = ", str);
  haval_print(fingerprint);
  printf("\n");
  str = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
  haval_string(str, fingerprint);
  printf("HAVAL(\"%s\")\n      = ", str);
  haval_print(fingerprint);
  printf("\n");
  str = "pi.frac";
  if (haval_file(str, fingerprint)) {
    printf("%s can not be opened !\n", str);
  } else {
    printf("HAVAL(File %s) = ", str);
    haval_print(fingerprint);
    printf("\n");
  }
}
```