user: 请从给定的汇编指令推导出C源代码:

```asm
<dump_cert_info>:
  endbr64
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  sub    $0x8,%rsp
  test   %esi,%esi
  je     L69
  call   <SSL_get_version@plt>
  lea    D7(%rip),%rdi
  mov    %rax,%rsi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %rbp,%rdi
  call   <SSL_get_cipher@plt>
  lea    D102(%rip),%rdi
  mov    %rax,%rsi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %rbp,%rdi
  call   <SSL_get_peer_certificate@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L41
  lea    D19(%rip),%rdi
  call   <puts@plt>
  jmp    L78
  nopl   0x0(%rax,%rax,1)
L69:
  call   <SSL_get_version@plt>
  lea    D67(%rip),%rdi
  mov    %rax,%rsi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %rbp,%rdi
  call   <SSL_get_cipher@plt>
  lea    D102(%rip),%rdi
  mov    %rax,%rsi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %rbp,%rdi
  call   <SSL_get_peer_certificate@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L41
  lea    D78(%rip),%rdi
  call   <puts@plt>
L78:
  mov    %rbp,%rdi
  call   <X509_get_subject_name@plt>
  xor    %edx,%edx
  xor    %esi,%esi
  mov    %eax,%edi
  call   <X509_NAME_oneline@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L15
L3:
  mov    %r12,%rsi
  lea    D106(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %r12,%rdi
  call   <OPENSSL_free@plt>
  mov    %rbp,%rdi
  call   <X509_get_issuer_name@plt>
  xor    %edx,%edx
  xor    %esi,%esi
  mov    %eax,%edi
  call   <X509_NAME_oneline@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L25
L61:
  mov    %r12,%rsi
  lea    D36(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %r12,%rdi
  call   <OPENSSL_free@plt>
  add    $0x8,%rsp
  mov    %rbp,%rdi
  pop    %rbp
  pop    %r12
  jmp    1160 <X509_free@plt>
  nopw   0x0(%rax,%rax,1)
L41:
  add    $0x8,%rsp
  lea    D59(%rip),%rdi
  pop    %rbp
  pop    %r12
  jmp    10e0 <puts@plt>
  nopl   0x0(%rax,%rax,1)
L25:
  lea    D65(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L61
L15:
  lea    D103(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L3
```

tool_calls: name: extract_symbolic_data
arguments: label: D7
type_guessed: string
name: extract_symbolic_data
arguments: label: D102
type_guessed: string
name: extract_symbolic_data
arguments: label: D19
type_guessed: string
name: extract_symbolic_data
arguments: label: D67
type_guessed: string
name: extract_symbolic_data
arguments: label: D78
type_guessed: string
name: extract_symbolic_data
arguments: label: D106
type_guessed: string
name: extract_symbolic_data
arguments: label: D36
type_guessed: string
name: extract_symbolic_data
arguments: label: D59
type_guessed: string
name: extract_symbolic_data
arguments: label: D65
type_guessed: string
name: extract_symbolic_data
arguments: label: D103
type_guessed: string

tool: D7: Ssl server version: %s

tool: D102: Using cipher %s

tool: D19: Client certificate:

tool: D67: Client Version: %s

tool: D78: Server certificate:

tool: D106: 	 Subject: %s


tool: D36: 	 Issuer: %s


tool: D59: Client does not have certificate.

tool: D65: warn X509 issuer name is null

tool: D103: warn X509 subject name is null

assistant: ```c
void dump_cert_info(SSL *ssl, bool server) {
  if (server) {
    printf("Ssl server version: %s", SSL_get_version(ssl));
  } else {
    printf("Client Version: %s", SSL_get_version(ssl));
  }
  printf("Using cipher %s", SSL_get_cipher(ssl));
  X509 *client_cert = SSL_get_peer_certificate(ssl);
  if (client_cert != NULL) {
    if (server) {
      printf("Client certificate:\n");
    } else {
      printf("Server certificate:\n");
    }
    char *str = X509_NAME_oneline(X509_get_subject_name(client_cert), 0, 0);
    if (str == NULL) {
      printf("warn X509 subject name is null");
    }
    printf("\t Subject: %s\n", str);
    OPENSSL_free(str);
    str = X509_NAME_oneline(X509_get_issuer_name(client_cert), 0, 0);
    if (str == NULL) {
      printf("warn X509 issuer name is null");
    }
    printf("\t Issuer: %s\n", str);
    OPENSSL_free(str);
    X509_free(client_cert);
  } else {
    printf("Client does not have certificate.\n");
  }
}
```