user: What is the c source code of the assembly code below:

```asm
<logging>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x88,%rsp
  mov    %rsi,0x8(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x78(%rsp)
  xor    %eax,%eax
  test   %rdi,%rdi
  je     L119
  mov    %rdi,%r12
  mov    %rdx,%r13
  mov    %ecx,%ebp
  mov    %rsi,%rbx
  test   %rsi,%rsi
  je     L106
  mov    %rsi,%rdi
  mov    $0x1,%r15d
  lea    D53(%rip),%r14
  call   <strlen@plt>
  mov    %rbx,%rdi
  mov    %r12,%rcx
  mov    $0x1,%esi
  mov    %eax,%edx
  lea    0x10(%rsp),%rbx
  call   <fwrite@plt>
  mov    %r12,%rcx
  mov    $0x2,%edx
  mov    $0x1,%esi
  lea    D20(%rip),%rdi
  call   <fwrite@plt>
  test   %ebp,%ebp
  jg     L49
  jmp    L155
  nopl   (%rax)
L73:
  cmp    %eax,%ebp
  jle    L155
L63:
  add    $0x1,%r15
L49:
  movzbl -0x1(%r13,%r15,1),%edx
  mov    %r14,%rsi
  mov    %rbx,%rdi
  call   <sprintf@plt>
  mov    %rbx,%rdi
  call   <strlen@plt>
  mov    %r12,%rcx
  mov    $0x1,%esi
  mov    %rbx,%rdi
  mov    %eax,%edx
  call   <fwrite@plt>
  mov    %r15d,%eax
  test   $0xf,%r15b
  jne    L73
  cmp    %r15d,%ebp
  jle    L73
  mov    %r12,%rcx
  mov    $0x1,%edx
  mov    $0x1,%esi
  lea    D13(%rip),%rdi
  call   <fwrite@plt>
  mov    $0x64,%edx
  mov    $0x20,%esi
  mov    %rbx,%rdi
  call   <memset@plt>
  mov    0x8(%rsp),%rdi
  call   <strlen@plt>
  mov    %r12,%rcx
  mov    $0x1,%esi
  mov    %rbx,%rdi
  lea    0x2(%rax),%edx
  call   <fwrite@plt>
  jmp    L63
  nopw   0x0(%rax,%rax,1)
L106:
  mov    %rdi,%rcx
  mov    $0x2,%edx
  mov    $0x1,%esi
  lea    D20(%rip),%rdi
  call   <fwrite@plt>
  test   %ebp,%ebp
  jle    L155
  mov    $0x1,%r15d
  lea    0x10(%rsp),%rbx
  lea    D53(%rip),%r14
  jmp    L30
  nopl   (%rax)
L159:
  cmp    %eax,%ebp
  jle    L155
L20:
  add    $0x1,%r15
L30:
  movzbl -0x1(%r13,%r15,1),%edx
  mov    %r14,%rsi
  mov    %rbx,%rdi
  call   <sprintf@plt>
  mov    %rbx,%rdi
  call   <strlen@plt>
  mov    %r12,%rcx
  mov    $0x1,%esi
  mov    %rbx,%rdi
  mov    %eax,%edx
  call   <fwrite@plt>
  mov    %r15d,%eax
  test   $0xf,%r15b
  jne    L159
  cmp    %r15d,%ebp
  jle    L159
  mov    %r12,%rcx
  mov    $0x1,%edx
  mov    $0x1,%esi
  lea    D13(%rip),%rdi
  call   <fwrite@plt>
  mov    $0x64,%edx
  mov    $0x20,%esi
  mov    %rbx,%rdi
  call   <memset@plt>
  jmp    L20
  cs nopw 0x0(%rax,%rax,1)
L155:
  mov    0x78(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L41
  add    $0x88,%rsp
  mov    %r12,%rcx
  mov    $0x1,%edx
  mov    $0x1,%esi
  pop    %rbx
  lea    D13(%rip),%rdi
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10d0 <fwrite@plt>
  nopw   0x0(%rax,%rax,1)
L119:
  mov    0x78(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L41
  add    $0x88,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L41:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: tag: D53
datatype: string
name: retrieve_data
arguments: tag: D20
datatype: string
name: retrieve_data
arguments: tag: D13
datatype: string

tool: D53: %02x 

tool: D20:   

tool: D13: 


assistant: ```c
void logging(FILE *logfile, const char *prefix, const unsigned char *buffer, int len) {
  if (NULL != logfile) {
    int i = 0;
    if (NULL != prefix) {
      fwrite(prefix, 1, strlen(prefix), logfile);
    }
    fwrite("  ", 1, 2, logfile);
    while (i < len) {
      char buf[100];
      sprintf(buf, "%02x ", (unsigned char)buffer[i]);
      fwrite(buf, 1, strlen(buf), logfile);
      i++;
      if (0 == (i & 15) && (i < len)) {
        fwrite("\n", 1, 1, logfile);
        memset(buf, 0x20, sizeof(buf));
        if (NULL != prefix) {
          fwrite(buf, 1, strlen(prefix) + 2, logfile);
        }
      }
    }
    fwrite("\n", 1, 1, logfile);
  }
}
```