user: Translate the below assembly code into C programming language:

```asm
<dump_log>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  lea    0xf(%rsi),%eax
  mov    %eax,%ecx
  shr    $0x4,%ecx
  mov    %ecx,0xc(%rsp)
  cmp    $0xf,%eax
  jbe    L5
  mov    %esi,%r13d
  mov    %rdi,%r15
  movq   $0x0,(%rsp)
  mov    $0x10,%r14d
  movl   $0x0,0x8(%rsp)
  jmp    L52
L86:
  lea    D36(%rip),%rsi
  mov    $0x8,%edi
  mov    $0x0,%eax
  call   <log_redirect@plt>
L70:
  and    $0x3,%r12d
  cmp    $0x3,%r12d
  je     L84
L100:
  add    $0x1,%rbp
  cmp    $0x10,%rbp
  je     L40
L24:
  mov    %ebp,%r12d
  lea    (%rbx,%rbp,1),%eax
  cmp    %eax,%r13d
  jbe    L86
  movzbl (%r15,%rbp,1),%edx
  lea    D42(%rip),%rsi
  mov    $0x8,%edi
  mov    $0x0,%eax
  call   <log_redirect@plt>
  jmp    L70
L84:
  lea    D26(%rip),%rsi
  mov    $0x8,%edi
  mov    $0x0,%eax
  call   <log_redirect@plt>
  jmp    L100
L40:
  lea    D36(%rip),%rsi
  mov    $0x8,%edi
  mov    $0x0,%eax
  call   <log_redirect@plt>
  mov    %r15,%rbp
  lea    D72(%rip),%r12
  jmp    L118
L6:
  movzbl %dl,%edx
  mov    %r12,%rsi
  mov    $0x8,%edi
  mov    $0x0,%eax
  call   <log_redirect@plt>
L35:
  add    $0x1,%ebx
  add    $0x1,%rbp
  cmp    %r14d,%ebx
  je     L110
L118:
  cmp    %r13d,%ebx
  jae    L38
  movzbl 0x0(%rbp),%edx
  lea    -0x20(%rdx),%eax
  cmp    $0x5e,%al
  jbe    L6
  lea    D39(%rip),%rsi
  mov    $0x8,%edi
  mov    $0x0,%eax
  call   <log_redirect@plt>
  jmp    L35
L38:
  lea    D36(%rip),%rsi
  mov    $0x8,%edi
  mov    $0x0,%eax
  call   <log_redirect@plt>
  jmp    L35
L110:
  lea    D5(%rip),%rsi
  mov    $0x8,%edi
  mov    $0x0,%eax
  call   <log_redirect@plt>
  addl   $0x1,0x8(%rsp)
  mov    0x8(%rsp),%eax
  add    $0x10,%r14d
  addq   $0x10,(%rsp)
  add    $0x10,%r15
  cmp    %eax,0xc(%rsp)
  jbe    L5
L52:
  mov    (%rsp),%ebx
  mov    %ebx,%edx
  lea    D82(%rip),%rsi
  mov    $0x8,%edi
  mov    $0x0,%eax
  call   <log_redirect@plt>
  mov    $0x0,%ebp
  jmp    L24
L5:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: unpack_data
arguments: label: D36
data_type: string
name: unpack_data
arguments: label: D42
data_type: string
name: unpack_data
arguments: label: D26
data_type: string
name: unpack_data
arguments: label: D72
data_type: string
name: unpack_data
arguments: label: D39
data_type: string
name: unpack_data
arguments: label: D5
data_type: string
name: unpack_data
arguments: label: D82
data_type: string

tool: D36:   

tool: D42: %02x

tool: D26:  

tool: D72: %c

tool: D39: .

tool: D5: 


tool: D82: %04X 

assistant: ```c
void dump_log(const void *nom_dump, unsigned int lng) {
  unsigned int i, j;
  unsigned int nbr_line;
  unsigned char car;
  nbr_line = (lng + 0x10 - 1) / 0x10;
  for (i = 0; (i < nbr_line); i++) {
    log_redirect((1 << 3), "%04X ", i * 0x10);
    for (j = 0; j < 0x10; j++) {
      if (i * 0x10 + j < lng) {
        car = *((const unsigned char *)nom_dump + i * 0x10 + j);
        log_redirect((1 << 3), "%02x", car);
      } else
        log_redirect((1 << 3), "  ");
      if (j % 4 == (4 - 1))
        log_redirect((1 << 3), " ");
    }
    log_redirect((1 << 3), "  ");
    for (j = 0; j < 0x10; j++) {
      if (i * 0x10 + j < lng) {
        car = *((const unsigned char *)nom_dump + i * 0x10 + j);
        if ((car < 32) || (car >= 127))
          log_redirect((1 << 3), ".");
        else
          log_redirect((1 << 3), "%c", car);
      } else
        log_redirect((1 << 3), "  ");
    }
    log_redirect((1 << 3), "\n");
  }
}
```